Files
git/builtin
Jeff King 31bb6d37f9 apply: avoid possible bogus pointer
When parsing "index" lines from a git-diff, we look for a
space followed by the mode. If we don't have a space, then
we set our pointer to the end-of-line. However, we don't
double-check that our end-of-line pointer is valid (e.g., if
we got a truncated diff input), which could lead to some
wrap-around pointer arithmetic.

In most cases this would probably get caught by our "40 <
len" check later in the function, but to be on the safe
side, let's just use strchrnul to treat end-of-string the
same as end-of-line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-24 13:57:50 -07:00
..
2014-07-24 13:57:50 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-03-14 14:25:31 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-04-03 12:38:47 -07:00
2014-03-31 15:29:27 -07:00
2014-03-25 11:02:02 -07:00
2014-04-08 12:00:33 -07:00
2013-12-17 12:02:44 -08:00
2013-07-15 10:56:07 -07:00
2014-03-14 14:25:03 -07:00
2014-02-27 14:01:48 -08:00
2014-01-17 12:21:20 -08:00