artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f7dfde
)
Do not walk off the end of the array performing frees
author
deraadt
<deraadt@openbsd.org>
Sat, 28 May 2022 03:20:14 +0000
(
03:20
+0000)
committer
deraadt
<deraadt@openbsd.org>
Sat, 28 May 2022 03:20:14 +0000
(
03:20
+0000)
crash found by daharmasterkor
lib/libpcap/gencode.c
patch
|
blob
|
history
diff --git
a/lib/libpcap/gencode.c
b/lib/libpcap/gencode.c
index
572e48d
..
23fca89
100644
(file)
--- a/
lib/libpcap/gencode.c
+++ b/
lib/libpcap/gencode.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: gencode.c,v 1.6
1 2022/03/28 02:58:06 dlg Exp $
*/
+/* $OpenBSD: gencode.c,v 1.6
2 2022/05/28 03:20:14 deraadt Exp $
*/
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@
-207,7
+207,7
@@
freechunks(void)
for (i = 0; i <= cur_membag; i++) {
if (membag[i].ptrs == NULL)
continue;
- for (j = 0; j <
=
membag[i].slot; j++)
+ for (j = 0; j < membag[i].slot; j++)
free(membag[i].ptrs[j]);
free(membag[i].ptrs);
membag[i].ptrs = NULL;