Re: [hackers] [sent] check for bin == NULL || Markus Teich

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Tue, 8 Dec 2015 22:33:20 +0000

On Tue, Dec 08, 2015 at 10:32:36PM +0100, git_AT_suckless.org wrote:
> commit edb46305647d909199a860b6b0812595742f6fe4
> Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
> AuthorDate: Tue Dec 8 22:34:48 2015 +0100
> Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
> CommitDate: Tue Dec 8 22:34:48 2015 +0100
>
> check for bin == NULL
>
> diff --git a/sent.c b/sent.c
> index 5f3cb59..5c72597 100644
> --- a/sent.c
> +++ b/sent.c
> _AT_@ -173,7 +173,8 @@ Image *ffopen(char *filename)
> REG_NOSUB | REG_EXTENDED | REG_ICASE))
> continue;
> if (!regexec(&regex, filename, 0, NULL, 0)) {
> - bin = filters[i].bin;
> + if (!(bin = filters[i].bin))
> + return NULL;
> break;
> }
> }

Hm yes, i actually meant to initialize bin to NULL and then check it
outside of the loop in case no regex matched.

This patch you applied fixes a different issue.
Received on Tue Dec 08 2015 - 23:33:20 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 08 2015 - 23:36:12 CET