++GITWEB_SITE_HTML_HEAD_STRING++

Jan 28, 2014 Warning: This GIT server is deprecated, we have moved to http://github.com/monkey

dirlisting: Fix off-by-one
authorLauri Kasanen <cand@gmx.com>
Tue, 9 Apr 2013 07:18:22 +0000 (10:18 +0300)
committerEduardo Silva <edsiper@gmail.com>
Tue, 9 Apr 2013 12:30:18 +0000 (06:30 -0600)
Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Eduardo Silva <edsiper@gmail.com>
plugins/dirlisting/dirlisting.h

index f6edd53..319cb5b 100644 (file)
@@ -64,7 +64,7 @@ struct mk_f_list
 {
     char ft_modif[MK_DIRHTML_FMOD_LEN];
     struct file_info info;
-    char name[NAME_MAX];
+    char name[NAME_MAX + 1]; /* The name can be up to NAME_MAX long; include NULL. */
     char *size;
     struct mk_f_list *next;
     unsigned char type;