Commit Graph
4 Commits
Author SHA1 Message Date
Lukas Fleischer 9afc883297 Avoid null pointer dereference in cgit_print_diff().
When calling cgit_print_diff() with a bad new_rev and a NULL old_rev,
checking for new_rev's parent commit will result in a null pointer
dereference. Returning on an invalid commit before dereferencing fixes
this. Spotted with clang-analyzer.

Signed-off-by: Lukas Fleischer <[email protected]>
Signed-off-by: Lars Hjemli <[email protected]>
2011-05-23 22:58:35 +02:00
Lukas Fleischer a0bf375a1a Avoid null pointer dereference in reencode().
Returning "*txt" if "txt" is a null pointer is a bad thing. Spotted with
clang-analyzer.

Signed-off-by: Lukas Fleischer <[email protected]>
Signed-off-by: Lars Hjemli <[email protected]>
2011-05-23 22:58:35 +02:00
Lukas Fleischer 070e109c14 Fix memory leak in http_parse_querystring().
Signed-off-by: Lukas Fleischer <[email protected]>
Signed-off-by: Lars Hjemli <[email protected]>
2011-05-23 22:58:35 +02:00
Lukas Fleischer c9059710e7 Remove unused variable from cgit_diff_tree().
Seen with "-Wunused-but-set-variable".

Signed-off-by: Lukas Fleischer <[email protected]>
Signed-off-by: Lars Hjemli <[email protected]>
2011-05-23 22:58:35 +02:00