]> gitweb.ps.run Git - ps-cgit/commitdiff
Avoid null pointer dereference in cgit_print_diff().
authorLukas Fleischer <cgit@cryptocrack.de>
Tue, 5 Apr 2011 08:38:53 +0000 (10:38 +0200)
committerLars Hjemli <hjemli@gmail.com>
Mon, 23 May 2011 20:58:35 +0000 (22:58 +0200)
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 <cgit@cryptocrack.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>

No differences found