X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgppacket.c;h=0956076526ccf4de7d398d5ccf18db4e9112584c;hb=3f35b8874fb10587ce43e2853a1ef95573222015;hp=d00315480ff7282babe130bc1c52c7c5e79a3300;hpb=1ee89902de184a640c171ae3285bff6882a791bd;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgppacket.c b/lib-crypt/pgppacket.c index d003154..0956076 100644 --- a/lib-crypt/pgppacket.c +++ b/lib-crypt/pgppacket.c @@ -22,17 +22,7 @@ static size_t plen = 0; static int read_material (size_t material, size_t * used, FILE * fp) { if (*used + material >= plen) { - unsigned char *p; - size_t nplen; - - nplen = *used + material + CHUNKSIZE; - - if (!(p = realloc (pbuf, nplen))) { /* __MEM_CHECKED__ */ - perror ("realloc"); - return -1; - } - plen = nplen; - pbuf = p; + p_realloc(&pbuf, plen = *used + material + CHUNKSIZE); } if (fread (pbuf + *used, 1, material, fp) < material) {