abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit bb7c859b5fff13e8b4afcc0f6878eb0626daef61
parent 5c7f933dcc3866229729b88c20a82a2ccc62b844
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 16 Feb 2015 22:44:29 +0100

Also NUL terminate string in error case #30714

Diffstat:
abduco.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/abduco.c b/abduco.c @@ -249,6 +249,7 @@ static bool set_socket_name(struct sockaddr_un *sockaddr, const char *name) { if (name[0] == '/') { strncpy(sockaddr->sun_path, name, maxlen); if (sockaddr->sun_path[maxlen-1]) { + sockaddr->sun_path[maxlen-1] = '\0'; errno = ENAMETOOLONG; return false; }