safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit b8dbdc4755041d3c11180863f2d56f037fb81952
parent 2afd68e3972e0f04ef4b3c8f4fcc93726dca03d8
Author: Willy Goiffon <dev@z3bra.org>
Date:   Mon, 27 May 2019 11:20:30 +0200

Fix strncat() usage to prevent overflow

Diffstat:
safe.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/safe.c b/safe.c @@ -207,7 +207,7 @@ creatsock(char *sockpath) err(1, "mkdtemp: %s", path); strncat(path, "/", 1); - strncat(path, SOCKET, sizeof(path)); + strncat(path, SOCKET, sizeof(path) - strlen(SOCKET) - 1); } sfd = socket(AF_UNIX, SOCK_STREAM, 0);