Description: Patch for hurd-i386 compilationshort summary of the patch> Bug: 737308 Bug-Debian: https://bugs.debian.org/737308 Last-Update: 2019-04-15 --- rserve-1.7-3.1.orig/src/Rserv.c +++ rserve-1.7-3.1/src/Rserv.c @@ -2206,14 +2206,17 @@ static void rm_rf(const char *what) { chmod(what, st.st_mode | ((st.st_mode & S_IFDIR) ? S_IRWXU : S_IWUSR)); if (st.st_mode & S_IFDIR) { /* dirs need to be deleted recursively */ DIR *dir = opendir(what); - char path[PATH_MAX]; + char *path = NULL; if (dir) { struct dirent *d; while ((d = readdir(dir))) { if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) continue; - snprintf(path, sizeof(path), "%s/%s", what, d->d_name); + int len = strlen(what) + 1 + strlen(d->d_name) + 1; + path = (char*)malloc(len); + snprintf(path, len, "%s/%s", what, d->d_name); rm_rf(path); + free(path); } closedir(dir); }