1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-21 01:59:07 +03:00

r1674: fixed a bug in the handling of STR_LEN8BIT flagged strings

This commit is contained in:
Andrew Tridgell 2004-08-09 20:47:31 +00:00 committed by Gerald (Jerry) Carter
parent c33bf6f935
commit 17a3315297

View File

@ -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;