[prev in list] [next in list] [prev in thread] [next in thread]
List: dragonfly-submit
Subject: Re: [PATCH] possible stack overflow in lib/libatm
From: Sepherosa Ziehau <sepherosa () gmail ! com>
Date: 2005-05-03 1:27:48
Message-ID: ea7b9c1705050218276b35ad1f () mail ! gmail ! com
[Download RAW message or body]
OK, patch recreated (strip off guarding against NULL pointer accessing).
Please review it.
Best Regards,
sephe
On 5/2/05, Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
> On Mon, May 02, 2005 at 05:43:14PM +0800, Sepherosa Ziehau wrote:
> > lib/libatm
> > 1) guard against possible stack overflow
> > 2) guard against possible NULL pointer accessing
>
> The first is ok. I'm not sure I like the others. It is common to
> let the caller guard for that, because it has to do that anyway.
>
> Joerg
>
--
Live Free or Die
["patch-libatm.txt" (text/plain)]
Index: atm_addr.c
===================================================================
RCS file: /opt/df_cvs/src/lib/libatm/atm_addr.c,v
retrieving revision 1.3
diff -u -r1.3 atm_addr.c
--- atm_addr.c 23 Sep 2004 21:39:08 -0000 1.3
+++ atm_addr.c 2 May 2005 09:43:44 -0000
@@ -177,6 +177,8 @@
*/
val = val << 4;
val += c_value;
+ if (out_len >= len)
+ return 0;
out[out_len] = (u_char) val;
out_len++;
break;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic