From 4d726d00918045d77d13b37a8d033926fc811422 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Nov 2001 03:50:53 +0000 Subject: prevent a bogus insure wild ptr message (This used to be commit 1976a8f87544140363449a361f7c7347ef2c44f5) --- source3/libsmb/nmblib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/nmblib.c') diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index dc399248186..0061a4b9772 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); -- cgit v1.2.1