From a4fab4d51a1c201810414a5b21b9d7bec4442646 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 11 Nov 2004 17:40:49 +0000 Subject: r3682: fix seg fault in lanman printing code caused by uninitialized variable (This used to be commit c52e663c4a32b975796383834b2c04796daf8f29) --- source3/smbd/lanman.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 610ee45120..e7aa05b54a 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -2267,6 +2267,12 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha return False; *rparam_len = 4; *rparam = REALLOC(*rparam,*rparam_len); + + if ( (snum = lp_servicenumber(sharename)) == -1 ) { + DEBUG(0,("api_PrintJobInfo: unable to get service number from sharename [%s]\n", + sharename)); + return False; + } *rdata_len = 0; -- cgit