Debian Codegraph @

debian/patches/rserv_on_hurd_patch

raw symbols SCIP
1 Descriptionscip-debian debian rserve 1.8-19-1 rserve/patches/rserv_on_hurd_patch#Description.: Patch for hurd-i386 compilationshort summary of the patch>
2 Bugscip-debian debian rserve 1.8-19-1 rserve/patches/rserv_on_hurd_patch#Bug.: 737308scip-debian-bts debian-bts . . 737308:
3 Bug-Debianscip-debian debian rserve 1.8-19-1 rserve/patches/rserv_on_hurd_patch#Bug-Debian.: https://bugs.debian.org/737308
4 Last-Updatescip-debian debian rserve 1.8-19-1 rserve/patches/rserv_on_hurd_patch#Last-Update.: 2019-04-15
5
6 --- rserve-1.7-3.1.orig/src/Rserv.cscip-debian debian rserve 1.8-19-1 rserve/upstream/`rserve-1.7-3.1.orig/src/Rserv.c`:
7 +++ rserve-1.7-3.1/src/Rserv.cscip-debian debian rserve 1.8-19-1 rserve/upstream/`rserve-1.7-3.1/src/Rserv.c`:
8 @@ -2206,14 +2206,17 @@ static void rm_rf(const char *what) {
9 chmod(what, st.st_mode | ((st.st_mode & S_IFDIR) ? S_IRWXU : S_IWUSR));
10 if (st.st_mode & S_IFDIR) { /* dirs need to be deleted recursively */
11 DIR *dir = opendir(what);
12 - char path[PATH_MAX];
13 + char *path = NULL;
14 if (dir) {
15 struct dirent *d;
16 while ((d = readdir(dir))) {
17 if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
18 continue;
19 - snprintf(path, sizeof(path), "%s/%s", what, d->d_name);
20 + int len = strlen(what) + 1 + strlen(d->d_name) + 1;
21 + path = (char*)malloc(len);
22 + snprintf(path, len, "%s/%s", what, d->d_name);
23 rm_rf(path);
24 + free(path);
25 }
26 closedir(dir);
27 }