diff options
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index 4143cb12ca..70e924a99f 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -814,12 +814,15 @@ size_t smbcli_blob_pull_string(struct smbcli_session *session, int extra; dest->s = NULL; - if (len_offset > blob->length-4) { - return 0; - } if (flags & STR_LEN8BIT) { + if (len_offset > blob->length-1) { + return 0; + } dest->private_length = CVAL(blob->data, len_offset); } else { + if (len_offset > blob->length-4) { + return 0; + } dest->private_length = IVAL(blob->data, len_offset); } extra = 0; |