forked from pool/coreutils
94e801cf55
* src/join.c: Instead of usig unreliable alloca() stack allocation, use heap allocation via xmalloc()+free(). (coreutils-i18n.patch, from Philipp Thomas <pth@suse.de>) - Avoid segmentation fault in "sort -d" and "sort -M" with long line input (bnc#798538, VUL-1) * src/sort.c: Instead of usig unreliable alloca() stack allocation, use heap allocation via xmalloc()+free(). (coreutils-i18n.patch, from Philipp Thomas <pth@suse.de>) OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=173
23 lines
678 B
Diff
23 lines
678 B
Diff
Index: src/join.c
|
|
===================================================================
|
|
--- src/join.c.orig
|
|
+++ src/join.c
|
|
@@ -1335,7 +1335,7 @@ main (int argc, char **argv)
|
|
|
|
case 't':
|
|
{
|
|
- char *newtab;
|
|
+ char *newtab = NULL;
|
|
size_t newtablen;
|
|
newtab = xstrdup (optarg);
|
|
#if HAVE_MBRTOWC
|
|
@@ -1357,7 +1357,7 @@ main (int argc, char **argv)
|
|
newtablen = 1;
|
|
if (! newtab)
|
|
{
|
|
- newtab = '\n'; /* '' => process the whole line. */
|
|
+ newtab = "\n"; /* '' => process the whole line. */
|
|
}
|
|
else if (optarg[1])
|
|
{
|