]> gitweb.ps.run Git - ps-cgit/commitdiff
ui-log: handle parse_commit() errors
authorJohn Keeping <john@keeping.me.uk>
Sat, 16 Jan 2016 11:03:05 +0000 (11:03 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 17 Jan 2016 16:05:00 +0000 (17:05 +0100)
If parse_commit() fails, none of the fields in the commit structure will
have been populated so we will dereference NULL when accessing
item->tree.

There isn't much we can do about the error at this point, but if we
return true then we'll try parsing the commit again from print_commit()
and we can report an error to the user at that point.

Coverity-id: 13801
Signed-off-by: John Keeping <john@keeping.me.uk>

No differences found