@matheusbsbs / matheus-bagliano / commits / 3c17c34ac7
Fork 0

imap-send.c: guard config parser from value=NULL

None of the configuration variables this expects is boolean. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 11, 2008 at 12:04 UTC 3c17c34ac79f58665db73deeb995bc070b7f1a2f
1 file changed +4
imap-send.c
+4
@@ -1254,6 +1254,10 @@ git_imap_config(const char *key, const char *val)
1254
1255 if (strncmp( key, imap_key, sizeof imap_key - 1 ))
1256 return 0;
1257 +
1258 + if (!val)
1259 + return config_error_nonbool(key);
1260 +
1261 key += sizeof imap_key - 1;
1262
1263 if (!strcmp( "folder", key )) {