git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3bd9de
)
s3-net: fix crash in rap_share_add().
author
Günther Deschner
<gd@samba.org>
Wed, 5 May 2010 15:17:12 +0000
(17:17 +0200)
committer
Günther Deschner
<gd@samba.org>
Wed, 5 May 2010 15:21:06 +0000
(17:21 +0200)
Guenther
source3/utils/net_rap.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_rap.c
b/source3/utils/net_rap.c
index 605043734ccc203db14df52123531e2db1dbcd93..8d5a3dbf15344bf237debc9d7e530df940fe0989 100644
(file)
--- 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;
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;
sinfo.perms = 0;
sinfo.maximum_users = c->opt_maxusers;
sinfo.active_users = 0;