From: Jim Meyering Date: Sat, 24 Sep 1994 00:41:27 +0000 (+0000) Subject: (main): Make sure s is not NULL before dereferencing it. X-Git-Tag: textutils-1_12_1~599 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00aa9449462b91cb0b2ef51c719c8733310c01a3;p=thirdparty%2Fcoreutils.git (main): Make sure s is not NULL before dereferencing it. --- diff --git a/src/nice.c b/src/nice.c index 814b81737d..a3c6bc3cf5 100644 --- a/src/nice.c +++ b/src/nice.c @@ -91,7 +91,7 @@ main (argc, argv) /* Make sure s[1..] is a valid negative integer. Test/convert `s+1' rather than `s+2' so we reject options like `---5' as unrecognized. */ - if (s[0] == '-' && s[1] == '-' && isinteger (s + 1)) + if (s && s[0] == '-' && s[1] == '-' && isinteger (s + 1)) { adjustment = atoi (s + 1); adjustment_given = 1;