summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-06-28 21:00:30 +0200
committerAndreas Schneider <asn@samba.org>2010-06-29 11:12:12 +0200
commite52f3d8637c7af2f0ea57954c7f13389f5a1e125 (patch)
treeed0112457449e1f7751f3601dbcdc06206050a3c /librpc
parent845e7a609d23677539d9439b941e0dffb53f6bc9 (diff)
downloadsamba-e52f3d8637c7af2f0ea57954c7f13389f5a1e125.tar.gz
samba-e52f3d8637c7af2f0ea57954c7f13389f5a1e125.tar.bz2
samba-e52f3d8637c7af2f0ea57954c7f13389f5a1e125.zip
s3-librpc: Fixed GUID_from_data_blob() with length of 32.
If we hit the case that the blob length is 32. The code goes to the end of the function and generates a GUID with garbage. So try to convert the blob to the GUID and return.
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/uuid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c
index d46da0993d..33a7eeeb5a 100644
--- a/librpc/ndr/uuid.c
+++ b/librpc/ndr/uuid.c
@@ -117,12 +117,12 @@ _PUBLIC_ NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid)
{
size_t rlen = strhex_to_str((char *)blob16.data, blob16.length,
(const char *)s->data, s->length);
- if (rlen == blob16.length) {
- /* goto the ndr_pull_struct_blob() path */
- status = NT_STATUS_OK;
- s = &blob16;
+ if (rlen != blob16.length) {
+ return NT_STATUS_INVALID_PARAMETER;
}
- break;
+
+ s = &blob16;
+ return GUID_from_ndr_blob(s, guid);
}
case 16:
return GUID_from_ndr_blob(s, guid);