mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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.
This commit is contained in:
parent
845e7a609d
commit
e52f3d8637
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user