cmp: initialize limit to avoid stack garbage limits

Approved by:	re (gjb)
Pointy hat:	kevans
Fixes:	4e380e8474 ("cmp: add -n, --bytes to limit number of bytes [...]")
Sponsored by:	Klara, Inc.

(cherry picked from commit f1f7f31366)
(cherry picked from commit aba2dc46df)
This commit is contained in:
Kyle Evans committed 2021-10-26 02:47:17 -05:00
1 parent 30ae8267b9
commit 3a504205e4
1 file changed
+1 -1
+1 -1
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) {