Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccb6e363 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

[PATCH] fs/smbfs/request.c: turn NULL dereference into BUG()



In a case documented as

  We should never be called with any of these states

BUG() in a case that would later result in a NULL pointer dereference.

Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6f08b72c
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -786,8 +786,7 @@ int smb_request_recv(struct smb_sb_info *server)
		/* We should never be called with any of these states */
		/* We should never be called with any of these states */
	case SMB_RECV_END:
	case SMB_RECV_END:
	case SMB_RECV_REQUEST:
	case SMB_RECV_REQUEST:
		server->rstate = SMB_RECV_END;
		BUG();
		break;
	}
	}


	if (result < 0) {
	if (result < 0) {