Fix uninitialized variable
authorimp <imp@FreeBSD.org>
Sun, 24 Sep 2017 05:03:57 +0000 (05:03 +0000)
committerimp <imp@FreeBSD.org>
Sun, 24 Sep 2017 05:03:57 +0000 (05:03 +0000)
commit51cbf27b74ecbf8d2e834db7db19a9d46cc1c7eb
tree11f769648955c583761162d9c9fad3a37ca4eb9f
parent5654997c008594fa54e5cac3e6309ebfd24dacc9
Fix uninitialized variable

echo | awk 'BEGIN {i=$1; print i}' prints a boatload of stack
garbage. NUL terminate the memory returned from malloc to prevent it.

Obtained from: OpenBSD run.c 1.40
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
contrib/one-true-awk/lib.c