summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-10 15:06:31 -0800
committerJeremy Allison <jra@samba.org>2007-12-10 15:06:31 -0800
commit8596a1b60996eda7e51bfd30d625d3201881d2af (patch)
tree5fd8daafa4f6259148782173ff02f06dbe414f8d
parent921bbc1331d35785e2c691551d4c103c9c29ed4d (diff)
downloadsamba-8596a1b60996eda7e51bfd30d625d3201881d2af.tar.gz
samba-8596a1b60996eda7e51bfd30d625d3201881d2af.tar.bz2
samba-8596a1b60996eda7e51bfd30d625d3201881d2af.zip
Ensure we have a non-null flags. Pointed out by Andreas Schneider <anschneider@suse.de>.
Jeremy. (This used to be commit cafde6c37259de587d3775a2d229abd253d2376d)
-rw-r--r--source3/libsmb/namequery.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index c0d6b6e91e..819147d48f 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -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));