Jeff King
ba176db511
config: handle NULL value when parsing non-bools
...
When the config parser sees an "implicit" bool like:
[core]
someVariable
it passes NULL to the config callback. Any callback code which expects a
string must check for NULL. This usually happens via helpers like
git_config_string(), etc, but some custom code forgets to do so and will
segfault.
These are all fairly vanilla cases where the solution is just the usual
pattern of:
if (!value)
return config_error_nonbool(var);
though note that in a few cases we have to split initializers like:
int some_var = initializer();
into:
int some_var;
if (!value)
return config_error_nonbool(var);
some_var = initializer();
There are still some broken instances after this patch, which I'll
address on their own in individual patches after this one.
Reported-by: Carlos Andrés Ramírez Cataño <antaigroupltda@gmail.com >
Signed-off-by: Jeff King <peff@peff.net >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2023-12-09 08:24:39 +09:00
..
2023-10-30 07:09:57 +09:00
2023-11-07 10:26:43 +09:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-10-23 13:04:47 -07:00
2023-12-09 08:24:39 +09:00
2023-10-23 12:22:57 -07:00
2023-10-29 08:56:17 +09:00
2023-08-07 11:57:18 -07:00
2023-10-09 12:46:33 -07:00
2023-08-11 09:44:52 -07:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:54 -07:00
2023-06-21 13:39:53 -07:00
2023-07-05 11:42:31 -07:00
2023-09-05 14:48:17 -07:00
2023-12-09 08:24:39 +09:00
2023-07-06 11:54:48 -07:00
2023-12-09 08:24:39 +09:00
2023-07-06 11:54:48 -07:00
2023-10-13 14:18:28 -07:00
2023-06-21 13:39:54 -07:00
2023-10-30 07:09:58 +09:00
2023-07-17 11:30:42 -07:00
2023-07-13 17:24:00 -07:00
2023-07-05 11:42:31 -07:00
2023-07-05 11:41:59 -07:00
2023-07-06 11:54:46 -07:00
2023-03-28 14:11:24 -07:00
2023-09-13 10:07:56 -07:00
2023-04-11 08:52:10 -07:00
2023-08-21 15:33:24 -07:00
2023-08-21 15:33:24 -07:00
2023-08-21 15:33:24 -07:00
2023-09-29 15:46:06 -07:00
2023-07-17 11:30:42 -07:00
2023-09-05 14:48:17 -07:00
2023-09-13 10:07:57 -07:00
2023-07-05 11:42:31 -07:00
2023-09-13 10:07:56 -07:00
2023-07-05 11:41:59 -07:00
2023-07-21 13:47:26 -07:00
2023-06-21 13:39:53 -07:00
2023-08-19 21:17:32 -07:00
2023-09-18 15:56:15 -07:00
2023-10-18 13:25:41 -07:00
2023-07-05 11:41:59 -07:00
2023-11-07 10:26:43 +09:00
2023-06-21 13:39:54 -07:00
2023-07-06 11:54:48 -07:00
2023-06-21 13:39:53 -07:00
2023-09-13 10:07:57 -07:00
2023-07-05 11:41:59 -07:00
2023-10-13 14:18:27 -07:00
2023-12-09 08:24:39 +09:00
2023-07-06 11:54:45 -07:00
2023-06-21 13:39:54 -07:00
2023-08-29 17:56:24 -07:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-11-02 08:51:40 +09:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-10-11 13:37:47 -07:00
2023-10-13 14:18:28 -07:00
2023-07-13 17:24:00 -07:00
2023-07-05 11:42:31 -07:00
2023-07-06 11:54:48 -07:00
2023-08-29 13:51:43 -07:00
2023-09-05 14:58:44 -07:00
2023-07-06 11:54:47 -07:00
2023-12-09 08:24:39 +09:00
2023-06-21 13:39:54 -07:00
2023-05-12 14:54:14 -07:00
2023-07-06 11:54:48 -07:00
2023-03-21 10:56:51 -07:00
2023-06-29 16:43:21 -07:00
2023-07-06 11:54:48 -07:00
2023-07-27 15:26:37 -07:00
2023-06-21 13:39:53 -07:00
2023-09-05 14:48:17 -07:00
2023-11-07 10:26:43 +09:00
2023-08-30 13:50:41 -07:00
2023-11-08 11:04:01 +09:00
2023-03-28 14:11:24 -07:00
2023-03-28 14:11:24 -07:00
2023-08-04 10:52:31 -07:00
2023-10-18 13:25:41 -07:00
2023-07-13 17:24:00 -07:00
2023-07-05 11:41:59 -07:00
2023-07-27 15:26:37 -07:00
2023-11-01 12:07:18 +09:00
2023-07-25 12:05:24 -07:00
2023-07-05 11:42:31 -07:00
2023-07-05 11:42:31 -07:00
2023-06-28 14:06:39 -07:00
2023-06-21 13:39:53 -07:00
2023-07-27 15:26:37 -07:00
2023-06-21 13:39:53 -07:00
2023-11-01 12:09:01 +09:00
2023-06-21 13:39:53 -07:00
2023-10-23 13:56:37 -07:00
2023-07-06 11:54:46 -07:00
2023-10-03 15:30:43 -07:00
2023-07-05 11:41:18 -07:00
2023-07-25 12:05:24 -07:00
2023-07-05 11:41:59 -07:00
2023-09-13 10:07:57 -07:00
2023-10-02 11:20:00 -07:00
2023-08-29 17:56:26 -07:00
2023-06-21 13:39:53 -07:00
2023-06-21 13:39:53 -07:00
2023-06-29 16:43:21 -07:00
2023-09-13 10:07:57 -07:00
2023-06-21 13:39:54 -07:00
2023-06-21 13:39:54 -07:00
2023-06-21 13:39:53 -07:00
2023-08-29 17:56:24 -07:00
2023-06-21 13:39:53 -07:00