From: franklahm Date: Tue, 17 Nov 2009 18:10:48 +0000 (+0000) Subject: strlcat'ting EA name was one short X-Git-Tag: branch-symlink-start~129 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2964d3483041ae1abab1c9c560ae07c8eba0e7f0;p=netatalk.git strlcat'ting EA name was one short --- diff --git a/etc/afpd/extattrs.c b/etc/afpd/extattrs.c index 5db87f2b..5a8bdad6 100644 --- a/etc/afpd/extattrs.c +++ b/etc/afpd/extattrs.c @@ -1,5 +1,5 @@ /* - $Id: extattrs.c,v 1.26 2009-11-13 13:52:02 didg Exp $ + $Id: extattrs.c,v 1.27 2009-11-17 18:10:48 franklahm Exp $ Copyright (c) 2009 Frank Lahm This program is free software; you can redistribute it and/or modify @@ -249,12 +249,12 @@ static char *to_stringz(char *ibuf, uint16_t len) { static char attrmname[256]; - if (len > 256) + if (len > 255) /* dont fool with us */ - len = 256; + len = 255; /* we must copy the name as its not 0-terminated and I DONT WANT TO WRITE to ibuf */ - strlcpy(attrmname, ibuf, len); + strlcpy(attrmname, ibuf, len + 1); return attrmname; }