diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-24 18:01:40 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-24 18:01:40 +0000 |
commit | 38227191ed2228ac6a07f826a68ace253cbd11dc (patch) | |
tree | 8414aecf7d4ab025dfaefd1b0ae44b92ca82df8e | |
parent | 57007050da6e45cc0f42b12c4b17812bfb423bcd (diff) | |
download | samba-38227191ed2228ac6a07f826a68ace253cbd11dc.tar.gz samba-38227191ed2228ac6a07f826a68ace253cbd11dc.tar.bz2 samba-38227191ed2228ac6a07f826a68ace253cbd11dc.zip |
Patch for nmbd core dump in printing debug packets. No length check.
Jeremy.
(This used to be commit eacb96396d57d6b622b750d64b3686e6fbeaf68c)
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 8b10298561..142268b0b0 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -107,12 +107,14 @@ static void debug_browse_data(char *outbuf, int len) for (j = 0; j < 16; j++) { - unsigned char x = outbuf[i+j]; + unsigned char x; + if (i+j >= len) + break; + + x = outbuf[i+j]; if (x < 32 || x > 127) x = '.'; - if (i+j >= len) - break; DEBUGADD( 4, ( "%c", x ) ); } |