From 11f973727c3503698bad7c87b1b5ca25102243b8 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Mon, 23 May 2016 21:52:11 +0200 Subject: Make nad2bin output reproducible. Init CTABLE.id char[80] variable with zeroes, so that nad2bin output does not depend on memory state before call, and hence be reproducible. --- src/nad2bin.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nad2bin.c b/src/nad2bin.c index 6587c638..2bbe2f4c 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -98,6 +98,7 @@ int main(int argc, char **argv) { /* Read the ASCII Table */ /* ==================================================================== */ + memset(ct.id,0,MAX_TAB_ID); if ( NULL == fgets(ct.id, MAX_TAB_ID, stdin) ) { perror("fgets"); exit(1); -- cgit v1.2.3