From 7e1c0ed2aa50ed2290f63912897a3724b224b7ea Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 20 Feb 2014 19:48:24 +0100 Subject: diffstat: do not rely on uninitialized data Right now if you visit: you'll see that if you reload the page a few times, a bunch of times the diffstat comes out with no lines being shown or changed. I'm not currently sure what the cause of this is, but I suspect it might have to do with this uninitialized data. Signed-off-by: Jason A. Donenfeld --- shared.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared.c b/shared.c index 7e88bbd..8ed14c0 100644 --- a/shared.c +++ b/shared.c @@ -368,6 +368,7 @@ void cgit_diff_tree(const unsigned char *old_sha1, struct diff_options opt; struct pathspec_item item; + memset(&item, 0, sizeof(item)); diff_setup(&opt); opt.output_format = DIFF_FORMAT_CALLBACK; opt.detect_rename = 1; -- cgit 1.4.1 ref='/src/'>summary refs log tree commit diff
Commit message (Collapse)Author
2017-07-23Remove useless setuid in briJune McEnroe
Don't you think it would be better if the setuid bit only gave you permission to do it and didn't do it for you?
2017-07-23Clean up hnel a tiny bitJune McEnroe
2017-07-21Set window size in hnelJune McEnroe
2017-07-21Add hnelJune McEnroe
2017-07-19chmod 600 in dtchJune McEnroe