From: Andrew Tridgell Date: Wed, 13 Nov 2024 22:57:08 +0000 (+1100) Subject: prevent information leak off the stack X-Git-Tag: v3.4.0~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=589b0691e59f761ccb05ddb8e1124991440db2c7;p=thirdparty%2Frsync.git prevent information leak off the stack prevent leak of uninitialised stack data in hash_search --- diff --git a/match.c b/match.c index 36e78ed2..dfd6af2c 100644 --- a/match.c +++ b/match.c @@ -147,6 +147,9 @@ static void hash_search(int f,struct sum_struct *s, int more; schar *map; + // prevent possible memory leaks + memset(sum2, 0, sizeof sum2); + /* want_i is used to encourage adjacent matches, allowing the RLL * coding of the output to work more efficiently. */ want_i = 0;