summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-16 15:42:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:24 -0500
commitb3d0836eac49cb24e8df4ef277e9fc3207eb0243 (patch)
treef75b26cb6836db56ea0b4ac4227dcc046bcdd2fe
parentb7a46675fb1157ab235008edf841ae7eed628049 (diff)
downloadsamba-b3d0836eac49cb24e8df4ef277e9fc3207eb0243.tar.gz
samba-b3d0836eac49cb24e8df4ef277e9fc3207eb0243.tar.bz2
samba-b3d0836eac49cb24e8df4ef277e9fc3207eb0243.zip
r21389: give a better error when our parser hasn't consumed all data
metze (This used to be commit 03b06398a405e491ce4e2bc91513a57e0d59466f)
-rw-r--r--source4/librpc/ndr/ndr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 028d66d7b7..cbd316f403 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -735,8 +735,8 @@ _PUBLIC_ NTSTATUS ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *me
}
status = fn(ndr, NDR_SCALARS|NDR_BUFFERS, p);
if (!NT_STATUS_IS_OK(status)) return status;
- if (ndr->offset != ndr->data_size) {
- return NT_STATUS_BUFFER_TOO_SMALL;
+ if (ndr->offset < ndr->data_size) {
+ return NT_STATUS_PORT_MESSAGE_TOO_LONG;
}
return status;
}