git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e74ad1b
)
smbd: Use strlcpy instead of StrnCpy
author
Volker Lendecke
<vl@samba.org>
Mon, 31 Dec 2018 06:15:21 +0000
(07:15 +0100)
committer
Jeremy Allison
<jra@samba.org>
Tue, 8 Jan 2019 02:40:26 +0000
(
03:40
+0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/lanman.c
patch
|
blob
|
history
diff --git
a/source3/smbd/lanman.c
b/source3/smbd/lanman.c
index dcc7f916d6e8901bd5e9a4dc139847edde00d2b8..9637194f697995800c99d9215c0afc4b38f29d8c 100644
(file)
--- a/
source3/smbd/lanman.c
+++ b/
source3/smbd/lanman.c
@@
-364,7
+364,7
@@
static int package(struct pack_desc *p, ...)
{
char *s = va_arg(args,char*);
if (p->buflen >= needed) {
-
StrnCpy(p->structbuf,s?s:"",needed-1
);
+
strlcpy(p->structbuf,s?s:"",needed
);
}
}
break;