Don't return NULL pointers for now.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 15 Feb 2003 21:41:01 +0000 (21:41 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 15 Feb 2003 21:41:01 +0000 (21:41 +0000)
We should look into how to deal with NULL v "" strings, and the NTLMSSP code
underneath properly at some stage.

Andrew Bartlett
(This used to be commit dc934412b0190ea75073cccddac45e74ebcd4a6b)

source3/libsmb/ntlmssp_parse.c

index 6644a3db713a778338af4ce362d8e194d6177a7d..ac779a3906840d14e7fbacd5c60bdb5af5058220 100644 (file)
@@ -234,9 +234,9 @@ BOOL msrpc_parse(const DATA_BLOB *blob,
                                pull_string(NULL, p, blob->data + ptr, sizeof(p), 
                                            len1, 
                                            STR_UNICODE|STR_NOALIGN);
-                               (*ps) = strdup(p);
+                               (*ps) = smb_xstrdup(p);
                        } else {
-                               (*ps) = NULL;
+                               (*ps) = smb_xstrdup("");
                        }
                        break;
                case 'A':
@@ -255,9 +255,9 @@ BOOL msrpc_parse(const DATA_BLOB *blob,
                                pull_string(NULL, p, blob->data + ptr, sizeof(p), 
                                            len1, 
                                            STR_ASCII|STR_NOALIGN);
-                               (*ps) = strdup(p);
+                               (*ps) = smb_xstrdup(p);
                        } else {
-                               (*ps) = NULL;
+                               (*ps) = smb_xstrdup("");
                        }
                        break;
                case 'B':