The Samba-Bugzilla – Attachment 5815 Details for
Bug 7538
Backport fixes for GUID_from_data_blob
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed GUID_from_data_blob() with length of 32.
0001-s3-librpc-Fixed-GUID_from_data_blob-with-length-of-3.patch (text/plain), 1.13 KB, created by
Andreas Schneider
on 2010-06-30 06:46:39 UTC
(
hide
)
Description:
Fixed GUID_from_data_blob() with length of 32.
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2010-06-30 06:46:39 UTC
Size:
1.13 KB
patch
obsolete
>From 49e74e7497cec10cc0a41b4021b198da9512dd2f Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Mon, 28 Jun 2010 21:00:30 +0200 >Subject: [PATCH] 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. >--- > librpc/ndr/uuid.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c >index 2b47246..80c35cd 100644 >--- a/librpc/ndr/uuid.c >+++ b/librpc/ndr/uuid.c >@@ -81,11 +81,12 @@ _PUBLIC_ NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid) > } else if (s->length == 32) { > 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; > } >+ >+ s = &blob16; >+ return GUID_from_ndr_blob(s, guid); > } > > if (s->length == 16) { >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
gd
:
review+
Actions:
View
Attachments on
bug 7538
: 5815 |
5831