summaryrefslogtreecommitdiffhomepage
path: root/scpmisc.h
diff options
context:
space:
mode:
authorFrançois Perrad <francois.perrad@gadz.org>2019-03-20 15:09:19 +0100
committerMatt Johnston <matt@ucc.asn.au>2019-03-20 22:09:19 +0800
commit28b6111db0f4ced931f2ce4b890a8d109904b8e2 (patch)
tree3ff28d553d9a52c18d302a13aef6bc46a6f1025c /scpmisc.h
parenta0aa2749813331134452f80bb8a808bdc871ba41 (diff)
use strlcpy & strlcat (#74)
* refactor checkpubkeyperms() with safe BSD functions fix gcc8 warnings ``` svr-authpubkey.c: In function 'checkpubkeyperms': svr-authpubkey.c:427:2: warning: 'strncat' specified bound 5 equals source length [-Wstringop-overflow=] strncat(filename, "/.ssh", 5); /* strlen("/.ssh") == 5 */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ svr-authpubkey.c:433:2: warning: 'strncat' specified bound 16 equals source length [-Wstringop-overflow=] strncat(filename, "/authorized_keys", 16); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` see https://www.sudo.ws/todd/papers/strlcpy.html * restore strlcpy in xstrdup see original https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/xmalloc.c?rev=1.16
Diffstat (limited to 'scpmisc.h')
0 files changed, 0 insertions, 0 deletions