[prev in list] [next in list] [prev in thread] [next in thread]
List: ntop-dev
Subject: [Ntop-dev] patch2/3: malloc check
From: Christian Hammers <ch () westend ! com>
Date: 2002-04-12 17:27:36
Message-ID: 20020412172736.GB25573 () westend ! com
[Download RAW message or body]
Hi
Just a small one. Maybe the comment is even right, but before we get
another buffer overflow someone should check this malloc.
bye,
-christian-
--
Christian Hammers WESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
ch@westend.com Internet & Security for Professionals Fax 0241/911879
WESTEND ist CISCO Systems Partner - Authorized Reseller
["ntop-malloc-check.diff" (text/plain)]
diff -u -r2.17 sessions.c
--- sessions.c 2002/04/12 13:00:58 2.17
+++ sessions.c 2002/04/12 17:15:08
@@ -549,6 +553,8 @@
*/
/* There's enough space left in the hashtable */
theSession = (IPSession*)malloc(sizeof(IPSession));
+ if (theSession==NULL) traceEvent(TRACE_ERROR, "malloc(%d) failed at line %d", \
sizeof(IPSession), __LINE__);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic