aboutsummaryrefslogtreecommitdiff
path: root/handler.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-19 13:08:09 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-19 23:58:03 +0100
commit66bc98275f24935b2d609ce9c98de5c3b73c6dd3 (patch)
tree786231b77622976e5ce6f508d523ea010e1c71d3 /handler.h
parent9624e8114408b96ac96675191ae2e34b0e403ee1 (diff)
downloadslcl-66bc98275f24935b2d609ce9c98de5c3b73c6dd3.tar.gz
main.c: Fix double free(3) and refactor form handling
- When a non-empty username and an empty password was given, slcl would crash due to a double free(3). This happened because append_form would grow the form list before sanitizing the input and, since the output pointer was not updated to the caller function, the latter would attempt to free a now-old pointer. - Additionally, some compilers such as clang complained about the potential use of an uninitialized variable when calling forms_free. - Also, it was a good opportunity to refactor get_forms and its caller functions, as get_forms was not differentiate fatal errors from user input errors.
Diffstat (limited to 'handler.h')
0 files changed, 0 insertions, 0 deletions