Ensure we have a non-null flags. Pointed out by Andreas Schneider <anschneider@suse...
authorJeremy Allison <jra@samba.org>
Mon, 10 Dec 2007 23:06:31 +0000 (15:06 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 10 Dec 2007 23:06:31 +0000 (15:06 -0800)
Jeremy.
(This used to be commit cafde6c37259de587d3775a2d229abd253d2376d)

source3/libsmb/namequery.c

index c0d6b6e91e530ed7755a1ee5a983651b487cac6a..819147d48f6c373662fb0d093261e6597857104a 100644 (file)
@@ -835,6 +835,13 @@ bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
                        continue;
                }
 
+               if (!flags) {
+                       flags = talloc_strdup(ctx, "");
+                       if (!flags) {
+                               continue;
+                       }
+               }
+
                DEBUG(4, ("getlmhostsent: lmhost entry: %s %s %s\n",
                                        ip, name, flags));