From: Jeremy Allison Date: Mon, 23 Apr 2007 21:40:54 +0000 (+0000) Subject: r22493: Fix horrible memory corruption bug with CIFS POSIX open/mkidr. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~615 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b01c1c4618fe0ff9fd9bac7ed780a4676ea1ba7a;p=thirdparty%2Fsamba.git r22493: Fix horrible memory corruption bug with CIFS POSIX open/mkidr. Found by SteveF + valgrind :-). Jerry - essential for rc3. Jeremy. --- diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 2c6df0a11e1..512b3162fad 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -5434,6 +5434,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn, *pdata_return_size = 0; return NT_STATUS_NO_MEMORY; } + pdata = *ppdata; SSVAL(pdata,0,NO_OPLOCK_RETURN); SSVAL(pdata,2,0); /* No fnum. */ @@ -5610,6 +5611,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn, *pdata_return_size = 0; return NT_STATUS_NO_MEMORY; } + pdata = *ppdata; if (extended_oplock_granted) { if (flags & REQUEST_BATCH_OPLOCK) {