diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2021-10-21 16:30:55 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2021-10-21 16:30:55 +0000 |
| commit | f1f7f31366e5830f4f5b96c6394a0b91475744f4 (patch) | |
| tree | 29ffbbdec335d6357bbf8c43ca90b636b5ad150f | |
| parent | 8cb175ba0c61dd8956ae96b8b4f25e494025cc62 (diff) | |
cmp: initialize limit to avoid stack garbage limits
Pointy hat: kevans
Fixes: 4e380e847460 ("cmp: add -n, --bytes to limit number of bytes [...]")
Sponsored by: Klara, Inc.
| -rw-r--r-- | usr.bin/cmp/cmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 98ae96c73375..83ea7ae7eee0 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -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) { |
