Up to [local] / src / usr.bin / apply
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_6_4
Revision 1.29 / (download) - annotate - [select for diffs], Sun Apr 1 17:45:05 2018 UTC (6 years, 2 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4,
HEAD
Changes since 1.28: +7 -2 lines
Diff to previous 1.28 (colored)
With malloc option J, the first realloc(3) in apply(1) would return memory that is filled with junk only. Allocate the empty string with malloc(3) and initialize it explicitly with the NUL terminator. OK tb@ tobias@