summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-09 20:47:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:48 -0500
commit3ef16b2679bed40041483b8f862463fb30f426dc (patch)
tree6f67c71058bd6d11edcc0e317ead5eeb946acdea
parent11afc70bb0471653ae7e2135c85853038ab7b95b (diff)
downloadsamba-3ef16b2679bed40041483b8f862463fb30f426dc.tar.gz
samba-3ef16b2679bed40041483b8f862463fb30f426dc.tar.bz2
samba-3ef16b2679bed40041483b8f862463fb30f426dc.zip
r1674: fixed a bug in the handling of STR_LEN8BIT flagged strings
(This used to be commit 17a331529706266bd53b2d1c7b873cf4bbd7aaa7)
-rw-r--r--source4/libcli/raw/rawrequest.c9
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;