This repository has been archived on 2024-11-07. You can view files and clone it, but cannot push or open issues or pull requests.
libacl/libacl-2.2.47-path_max.patch

25 lines
644 B
Diff

--- acl-2.2.47/setfacl/parse.c 2007-09-11 04:00:49.000000000 +0200
+++ acl-2.2.47/setfacl/parse.c-gil 2008-11-30 04:20:38.000000000 +0100
@@ -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 9
+ 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[(4*PATH_MAX)+9];
char *cp;
char *p;
int comments_read = 0;