[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug: grep 2.5e - error message is bad for incorrect "-C" arg
From: |
Greg Fast |
Subject: |
bug: grep 2.5e - error message is bad for incorrect "-C" arg |
Date: |
Mon, 26 Mar 2001 10:20:39 -0600 |
Found this:
% grep -Cx
grep: x: invalid context length argument: !ùÿ¿&ùÿ¿
% grep --version
grep (GNU grep) 2.5e
...
The offending line looks like src/grep.c +191:
183 static void
184 context_length_arg (char const *str, int *out)
185 {
186 uintmax_t value;
187 if (! (xstrtoumax (str, 0, 10, &value, "") == LONGINT_OK
188 && 0 <= (*out = value)
189 && *out == value))
190 {
191 error (2, 0, "%s: %s: %s\n", str, _("invalid context length
argument"));
So it's just dumping an uninitilized location, not dependant on the
command line, and probably not exploitable? But I'm not sure I fully
grasp the macros involved, since I just looked at this quickly.
--
Greg Fast
- bug: grep 2.5e - error message is bad for incorrect "-C" arg,
Greg Fast <=