Commit 27102b38 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fix from Steve French:

 - Fix potential null pointer dereference

* tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: Add check for next_buffer in receive_encrypted_standard()
parents 5cf80612 860ca5e5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4965,6 +4965,10 @@ receive_encrypted_standard(struct TCP_Server_Info *server,
			next_buffer = (char *)cifs_buf_get();
		else
			next_buffer = (char *)cifs_small_buf_get();
		if (!next_buffer) {
			cifs_server_dbg(VFS, "No memory for (large) SMB response\n");
			return -1;
		}
		memcpy(next_buffer, buf + next_cmd, pdu_length - next_cmd);
	}