Skip to content

Commit 589b069

Browse files
committed
prevent information leak off the stack
prevent leak of uninitialised stack data in hash_search
1 parent 3621202 commit 589b069

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

match.c

+3
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ static void hash_search(int f,struct sum_struct *s,
147147
int more;
148148
schar *map;
149149

150+
// prevent possible memory leaks
151+
memset(sum2, 0, sizeof sum2);
152+
150153
/* want_i is used to encourage adjacent matches, allowing the RLL
151154
* coding of the output to work more efficiently. */
152155
want_i = 0;

0 commit comments

Comments
 (0)