diff options
author | Jim Meyering <jim@meyering.net> | 1994-09-24 00:41:27 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-09-24 00:41:27 +0000 |
commit | 00aa9449462b91cb0b2ef51c719c8733310c01a3 (patch) | |
tree | f7066f1b3ce72c42b58c31c7f384e9ab7458263e /src/nice.c | |
parent | f0ea13bbe9c050d0cc97d14045fb1d2b40ee1dd4 (diff) | |
download | coreutils-00aa9449462b91cb0b2ef51c719c8733310c01a3.tar.xz |
(main): Make sure s is not NULL before dereferencing it.
Diffstat (limited to 'src/nice.c')
-rw-r--r-- | src/nice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nice.c b/src/nice.c index 814b81737..a3c6bc3cf 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; |