diff options
Diffstat (limited to '')
-rw-r--r-- | local.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -168,7 +168,7 @@ loadLocalDir(char *dname) else { #if defined(HAVE_LSTAT) && defined(HAVE_READLINK) if (S_ISLNK(lst.st_mode)) { - if ((l = readlink(fbuf->ptr, lbuf, sizeof(lbuf))) > 0) { + if ((l = readlink(fbuf->ptr, lbuf, sizeof(lbuf) - 1)) > 0) { lbuf[l] = '\0'; Strcat_m_charp(tmp, " -> ", html_quote(conv_from_system(lbuf)), NULL); @@ -433,6 +433,5 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer) fprintf(stderr, "execl(\"%s\", \"%s\", NULL): %s\n", file, cgi_basename, strerror(errno)); exit(1); - return NULL; #endif } |