3
0
forked from pool/coreutils

Fix previous commit: call xcalloc for 1 member

OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=216
This commit is contained in:
Bernhard Voelker 2013-12-20 08:58:45 +00:00 committed by Git OBS Bridge
parent edd1210fec
commit b6dd569b3a

View File

@ -1498,7 +1498,7 @@ Index: src/join.c
+ for (i = 0; i < 2; i++) + for (i = 0; i < 2; i++)
+ { + {
+ mallocd = 1; + mallocd = 1;
+ copy[i] = xcalloc (0, len[i] + 1); + copy[i] = xcalloc (1, len[i] + 1);
+ +
+ for (j = 0; j < MIN (len[0], len[1]);) + for (j = 0; j < MIN (len[0], len[1]);)
+ { + {
@ -3902,7 +3902,7 @@ Index: src/uniq.c
+ +
+ for (i = 0; i < 2; i++) + for (i = 0; i < 2; i++)
+ { + {
+ copy[i] = xcalloc (0, len[i] + 1); + copy[i] = xcalloc (1, len[i] + 1);
+ +
+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++) + for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
+ { + {