Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Fix use-after-free. Discovered by running tests ...
details: https://anonhg.NetBSD.org/src/rev/134335382320
branches: trunk
changeset: 763448:134335382320
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sun Mar 20 12:36:14 2011 +0000
description:
Fix use-after-free. Discovered by running tests with MALLOC_OPTIONS=J
(should this be the default for tests ?), pointed out by njoly@
diffstat:
lib/libedit/el.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r d5020a1fe094 -r 134335382320 lib/libedit/el.c
--- a/lib/libedit/el.c Sun Mar 20 12:21:28 2011 +0000
+++ b/lib/libedit/el.c Sun Mar 20 12:36:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $ */
+/* $NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
#else
-__RCSID("$NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $");
+__RCSID("$NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -135,13 +135,13 @@
sig_end(el);
el_free((ptr_t) el->el_prog);
- el_free((ptr_t) el);
#ifdef WIDECHAR
el_free((ptr_t) el->el_scratch.cbuff);
el_free((ptr_t) el->el_scratch.wbuff);
el_free((ptr_t) el->el_lgcyconv.cbuff);
el_free((ptr_t) el->el_lgcyconv.wbuff);
#endif
+ el_free((ptr_t) el);
}
Home |
Main Index |
Thread Index |
Old Index