r4098: catch null guid string so RPC-DRSUAPI works against my server
authorAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2004 10:24:10 +0000 (10:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:26 +0000 (13:06 -0500)
(This used to be commit c4c83f04f55d206716380330d2a4d2b31f893346)

source4/librpc/ndr/ndr_misc.c

index 0b5954d7f98d6715eb52b54fe0871afeb96523e0..a538dd3033208beca59bd4c59462dc25d8c4a1ec 100644 (file)
@@ -37,6 +37,10 @@ NTSTATUS GUID_from_string(const char *s, struct GUID *guid)
        uint32_t node[6];
        int i;
 
        uint32_t node[6];
        int i;
 
+       if (s == NULL) {
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+
        if (11 == sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                         &time_low, &time_mid, &time_hi_and_version, 
                         &clock_seq[0], &clock_seq[1],
        if (11 == sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                         &time_low, &time_mid, &time_hi_and_version, 
                         &clock_seq[0], &clock_seq[1],