Skip to content

Commit 63a838a

Browse files
authored
strings: broken -n NUM validation
* The number passed to -n can be more than 1 digit %/usr/bin/strings -n150 /bin/bash | md5sum && perl strings -n150 /bin/bash | md5sum 18cf22fcd75586ea1c6e5411c338c11d - 18cf22fcd75586ea1c6e5411c338c11d -
1 parent 4555c26 commit 63a838a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ sub usage {
7272

7373
getopts( 'afon:t:' ) or usage();
7474
if (defined $opt_n) {
75-
if ($opt_n !~ m/\A[0-9]\Z/ || $opt_n == 0) {
75+
if ($opt_n !~ m/\A[0-9]+\Z/ || $opt_n == 0) {
7676
warn "$Program: invalid minimum string length '$opt_n'\n";
7777
exit EX_FAILURE;
7878
}

0 commit comments

Comments
 (0)