mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit eb09650bbaa9ad4376677abb37194f436c837847
parent 795b756e5a984fc7f886ba103dc7fb889811d0af
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Fri, 29 Jul 2016 13:10:25 +0200

msort: check realloc

Diffstat:
msort.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/msort.c b/msort.c @@ -234,6 +234,8 @@ add(char *file) if (mailalloc < 0) exit(-1); mails = realloc(mails, sizeof (struct mail) * mailalloc); + if (!mails) + exit(-1); memset(mails+mailalloc/2, 0, sizeof (struct mail) * mailalloc/2); } if (!mails)