git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9db84de
)
Patch for nmbd core dump in printing debug packets. No length check.
author
Jeremy Allison
<jra@samba.org>
Tue, 24 Apr 2001 18:01:40 +0000
(18:01 +0000)
committer
Jeremy Allison
<jra@samba.org>
Tue, 24 Apr 2001 18:01:40 +0000
(18:01 +0000)
Jeremy.
source/nmbd/nmbd_packets.c
patch
|
blob
|
history
diff --git
a/source/nmbd/nmbd_packets.c
b/source/nmbd/nmbd_packets.c
index 8b1029856119541051e0e3bea3bd58c38ac4628e..142268b0b01bfa93c0d313bc3852ce42f5817a19 100644
(file)
--- a/
source/nmbd/nmbd_packets.c
+++ b/
source/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 ) );
}