@ -1726,8 +1726,7 @@ PHP_FUNCTION(fdf_get_attachment) {
RETURN_FALSE;
}
strncpy(pathbuf , savepath, MAXPATHLEN-1);
pathbuf[MAXPATHLEN-1] = '\0';
strlcpy(pathbuf, savepath, sizeof(pathbuf));
if(0 == stat(pathbuf, &statBuf)) {
is_dir = S_ISDIR(statBuf.st_mode);
@ -730,9 +730,7 @@ static int parse(char *l, int lineno)
return -1;
strncpy(m->desc, l, sizeof(m->desc) - 1);
m->desc[sizeof(m->desc) - 1] = '\0';
strlcpy(m->desc, l, sizeof(m->desc));
return 0;