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-03-28 13:51:05 -07:00
2014-07-24 13:57:50 -07:00
2013-12-05 14:13:21 -08:00
2013-08-05 11:32:19 -07:00
2014-04-03 12:38:11 -07:00
2014-02-20 14:15:46 -08:00
2014-03-25 11:07:36 -07:00
2014-03-18 14:03:03 -07:00
2013-09-20 12:37:32 -07:00
2013-07-13 10:19:37 -07:00
2013-10-30 12:10:56 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-03-18 11:25:12 -07:00
2013-12-05 14:13:21 -08:00
2014-02-24 14:51:35 -08:00
2014-04-08 12:00:28 -07:00
2014-02-18 16:12:14 -08:00
2013-04-10 13:27:26 -07:00
2014-03-14 14:25:31 -07:00
2013-07-15 10:56:08 -07:00
2013-07-15 10:56:08 -07:00
2013-12-27 14:58:17 -08:00
2013-12-17 12:02:44 -08:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2013-12-05 14:13:21 -08:00
2014-02-20 14:15:46 -08:00
2014-03-14 14:27:06 -07:00
2014-04-03 12:38:47 -07:00
2013-12-03 12:35:22 -08:00
2014-02-24 14:37:09 -08:00
2013-08-07 08:30:55 -07:00
2014-01-06 11:26:31 -08:00
2014-03-25 11:08:19 -07:00
2014-04-17 11:09:56 -07:00
2014-03-31 15:29:27 -07:00
2014-02-24 14:37:19 -08:00
2014-02-20 14:15:46 -08:00
2014-02-24 14:37:14 -08:00
2013-12-05 14:13:21 -08:00
2013-03-02 22:52:44 -08:00
2014-02-13 13:38:59 -08:00
2013-08-05 11:32:19 -07:00
2013-07-09 09:12:48 -07:00
2013-12-05 14:13:21 -08:00
2013-05-06 22:17:00 -07:00
2014-04-08 11:59:27 -07:00
2014-03-03 14:54:45 -08:00
2014-03-25 11:02:02 -07:00
2014-02-20 14:15:46 -08:00
2014-03-24 10:43:34 -07:00
2014-04-08 12:00:33 -07:00
2012-12-13 11:13:44 -08:00
2013-05-01 15:33:11 -07:00
2014-02-24 09:08:37 -08:00
2014-03-14 14:27:06 -07:00
2014-03-07 15:18:28 -08:00
2013-10-16 10:26:39 -07:00
2014-07-24 13:57:49 -07:00
2014-02-20 14:15:46 -08:00
2013-12-17 12:02:44 -08:00
2014-03-18 13:50:29 -07:00
2014-03-14 14:27:06 -07: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-07-24 13:57:49 -07:00
2014-03-24 10:43:34 -07:00
2014-02-27 14:01:15 -08:00
2014-01-17 12:21:20 -08:00
2013-12-05 14:13:21 -08:00
2014-07-24 13:57:49 -07:00
2013-12-05 14:13:21 -08:00
2013-09-06 13:33:17 -07:00
2013-12-05 14:13:21 -08:00
2014-03-24 10:43:34 -07:00
2014-03-14 14:27:06 -07:00
2014-03-24 10:43:35 -07:00
2014-04-02 10:40:43 -07:00
2012-08-22 10:58:29 -07:00
2013-12-05 14:13:21 -08:00
2012-08-22 10:58:29 -07:00
2013-02-14 09:30:04 -08:00
2012-08-22 10:58:29 -07:00