cmp: initialize limit to avoid stack garbage limits

Pointy hat:	kevans
Fixes:	4e380e8474 ("cmp: add -n, --bytes to limit number of bytes [...]")
Sponsored by:	Klara, Inc.
This commit is contained in:
Kyle Evans 2021-10-21 11:30:55 -05:00
parent 8cb175ba0c
commit f1f7f31366

View File

@ -105,7 +105,7 @@ main(int argc, char *argv[])
bool special;
const char *file1, *file2;
skip1 = skip2 = 0;
limit = skip1 = skip2 = 0;
oflag = O_RDONLY;
while ((ch = getopt_long(argc, argv, "+bhi:ln:sxz", long_opts, NULL)) != -1)
switch (ch) {