summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-27 03:50:53 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-27 03:50:53 +0000
commit4d726d00918045d77d13b37a8d033926fc811422 (patch)
tree31399192bb21eee50f51f60769f153b0b3dd836b
parenta3e74d16d097d9a5393abfc7ae09a9c56d369bb6 (diff)
downloadsamba-4d726d00918045d77d13b37a8d033926fc811422.tar.gz
samba-4d726d00918045d77d13b37a8d033926fc811422.tar.bz2
samba-4d726d00918045d77d13b37a8d033926fc811422.zip
prevent a bogus insure wild ptr message
(This used to be commit 1976a8f87544140363449a361f7c7347ef2c44f5)
-rw-r--r--source3/libsmb/nmblib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index dc39924818..0061a4b977 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -171,13 +171,14 @@ static BOOL handle_name_ptrs(uchar *ubuf,int *offset,int length,
parse a nmb name from "compressed" format to something readable
return the space taken by the name, or 0 if the name is invalid
******************************************************************/
-static int parse_nmb_name(char *inbuf,int offset,int length, struct nmb_name *name)
+static int parse_nmb_name(char *inbuf,int ofs,int length, struct nmb_name *name)
{
int m,n=0;
uchar *ubuf = (uchar *)inbuf;
int ret = 0;
BOOL got_pointer=False;
int loop_count=0;
+ int offset = ofs;
if (length - offset < 2)
return(0);