librpc: add SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET) protection
authorStefan Metzmacher <metze@samba.org>
Mon, 24 Dec 2018 10:21:38 +0000 (11:21 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:31 +0000 (03:13 +0100)
commita94c4e55b7347ce5a524eeed78db632c5a251f4d
tree20fc8396fea1e2275fe786b73b53a3c9071a1713
parentc919514d2d9b358a8bb1ab152d34c5345677ba78
librpc: add SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET) protection

A lot of functions rely on having the 16 bytes dcerpc header to operate
on. This makes it more obvious and makes sure they can't be misused in
future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
librpc/rpc/dcerpc_util.c