X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgppacket.c;h=0956076526ccf4de7d398d5ccf18db4e9112584c;hb=8f75834aeadb902879602a82a259f4d3bf9c569c;hp=450f8aaabd00bb74486fc930b99754854b048d05;hpb=ac813896ca32d850febc2d95065ac4fa040f11f9;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgppacket.c b/lib-crypt/pgppacket.c index 450f8aa..0956076 100644 --- a/lib-crypt/pgppacket.c +++ b/lib-crypt/pgppacket.c @@ -7,17 +7,7 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - -#include +#include #include #include "lib.h" @@ -32,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) {