On Tue, Dec 08, 2015 at 10:32:36PM +0100, [email protected] wrote: > commit edb46305647d909199a860b6b0812595742f6fe4 > Author: Markus Teich <[email protected]> > AuthorDate: Tue Dec 8 22:34:48 2015 +0100 > Commit: Markus Teich <[email protected]> > 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 > @@ -173,7 +173,8 @@ Image *ffopen(char *filename) > REG_NOSUB | REG_EXTENDED | REG_ICASE)) > continue; > if (!regexec(®ex, 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.
