Am 02.11.2017 um 03:18 schrieb Junio C Hamano:
> René Scharfe writes:
>
>> @@ -807,6 +816,8 @@ static int get_cmd_result(struct imap_store *ctx, struct
>> imap_cmd *tcmd)
>> if (cmdp->cb.cont || cmdp->cb.data)
>> imap->literal_pending = 0;
>>
René Scharfe writes:
> @@ -807,6 +816,8 @@ static int get_cmd_result(struct imap_store *ctx, struct
> imap_cmd *tcmd)
> if (cmdp->cb.cont || cmdp->cb.data)
> imap->literal_pending = 0;
> arg = next_arg(&cmd);
> +
next_arg() returns NULL if it runs out of arguments. Most call sites
already handle that gracefully. Check in the remaining cases as well.
Replace the NULL pointer with an empty string at the bottom of
get_cmd_result() -- it's nicely reported as an unexpected response a
few lines down. Error out
3 matches
Mail list logo