[PATCH] smbd/smb2_ioctl: check for NULL dst_fsp before use

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] smbd/smb2_ioctl: check for NULL dst_fsp before use

Samba - samba-technical mailing list
...not after. CID #1409040.

Signed-off-by: David Disseldorp <[hidden email]>
---
 source3/smbd/smb2_ioctl_filesys.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c
index fbff97cc830..392372ffecd 100644
--- a/source3/smbd/smb2_ioctl_filesys.c
+++ b/source3/smbd/smb2_ioctl_filesys.c
@@ -186,16 +186,17 @@ static struct tevent_req *fsctl_dup_extents_send(TALLOC_CTX *mem_ctx,
  if (req == NULL) {
  return NULL;
  }
- *state = (struct fsctl_dup_extents_state) {
- .conn = dst_fsp->conn,
- .ev = ev,
- };
 
  if (dst_fsp == NULL) {
  tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
  return tevent_req_post(req, ev);
  }
 
+ *state = (struct fsctl_dup_extents_state) {
+ .conn = dst_fsp->conn,
+ .ev = ev,
+ };
+
  if ((dst_fsp->conn->fs_capabilities
  & FILE_SUPPORTS_BLOCK_REFCOUNTING) == 0) {
  DBG_INFO("FS does not advertise block refcounting support\n");
--
2.12.0


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] smbd/smb2_ioctl: check for NULL dst_fsp before use

Samba - samba-technical mailing list
Hi David,

On Tue, May 16, 2017 at 02:03:32PM +0200, David Disseldorp via samba-technical wrote:
> ...not after. CID #1409040.

can you please resend the patch as an attachment? I have no idea how to get your
git-mail patch out of mutt properly.

Thanks!
-slow


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] smbd/smb2_ioctl: check for NULL dst_fsp before use

Samba - samba-technical mailing list
On Tue, May 16, 2017 at 03:24:37PM +0200, Ralph Böhme via samba-technical wrote:
> Hi David,
>
> On Tue, May 16, 2017 at 02:03:32PM +0200, David Disseldorp via samba-technical wrote:
> > ...not after. CID #1409040.
>
> can you please resend the patch as an attachment? I have no idea how to get your
> git-mail patch out of mutt properly.

ah, never mind, figured it out. :)

Cheerio!
-slow