mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-29 21:32:22 +01:00
Fixes build of webkitgtk. Patch is from: http://trac.webkit.org/browser/trunk/Tools/gtk/patches
33 lines
779 B
Diff
33 lines
779 B
Diff
--- ./job.c.orig
|
|
+++ ./job.c
|
|
@@ -2880,7 +2880,7 @@
|
|
#define EVAL_LEN 0
|
|
#endif
|
|
|
|
- new_line = alloca (shell_len + 1 + sflags_len + 1
|
|
+ new_line = xmalloc (shell_len + 1 + sflags_len + 1
|
|
+ (line_len*2) + 1 + EVAL_LEN);
|
|
ap = new_line;
|
|
memcpy (ap, shell, shell_len);
|
|
@@ -2970,9 +2970,11 @@
|
|
}
|
|
#endif
|
|
}
|
|
- if (ap == new_line + shell_len + sflags_len + 2)
|
|
+ if (ap == new_line + shell_len + sflags_len + 2) {
|
|
/* Line was empty. */
|
|
+ free (new_line);
|
|
return 0;
|
|
+ }
|
|
*ap = '\0';
|
|
|
|
#ifdef WINDOWS32
|
|
@@ -3112,6 +3114,7 @@
|
|
fatal (NILF, _("%s (line %d) Bad shell context (!unixy && !batch_mode_shell)\n"),
|
|
__FILE__, __LINE__);
|
|
#endif
|
|
+ free (new_line);
|
|
}
|
|
#endif /* ! AMIGA */
|
|
|