acl/acl-2.2.39-path_max.patch

25 lines
644 B
Diff

--- acl-2.2.39/setfacl/parse.c.path_max 2006-06-20 02:51:25.000000000 -0400
+++ acl-2.2.39/setfacl/parse.c 2006-07-05 15:27:21.000000000 -0400
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -412,7 +413,12 @@
gid_t *gid_p)
{
int c;
- char linebuf[1024];
+ /*
+ Max PATH_MAX bytes even for UTF-8 path names and additional 6
+ bytes for "#file:". Not a good solution but for now it is the
+ best I can do without too much impact on the code. [tw]
+ */
+ char linebuf[PATH_MAX+6];
char *cp;
char *p;
int comments_read = 0;