summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-05 17:17:12 +0200
committerGünther Deschner <gd@samba.org>2010-05-05 17:21:06 +0200
commit6659a0fe92ce67ff5edab1618d8809e745ab6354 (patch)
tree5a7145766b25a8bef970f3feb1065fa5eeb63c2d
parentd3bd9de0878f532f1ed3448d1632605264229f82 (diff)
downloadsamba-6659a0fe92ce67ff5edab1618d8809e745ab6354.tar.gz
samba-6659a0fe92ce67ff5edab1618d8809e745ab6354.tar.bz2
samba-6659a0fe92ce67ff5edab1618d8809e745ab6354.zip
s3-net: fix crash in rap_share_add().
Guenther
-rw-r--r--source3/utils/net_rap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index 605043734c..8d5a3dbf15 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -249,7 +249,7 @@ static int rap_share_add(struct net_context *c, int argc, const char **argv)
strlcpy((char *)sinfo.share_name, sharename, sizeof(sinfo.share_name));
sinfo.reserved1 = '\0';
sinfo.share_type = 0;
- sinfo.comment = smb_xstrdup(c->opt_comment);
+ sinfo.comment = c->opt_comment ? smb_xstrdup(c->opt_comment) : "";
sinfo.perms = 0;
sinfo.maximum_users = c->opt_maxusers;
sinfo.active_users = 0;