X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-crypt%2Fpgppacket.c;h=0956076526ccf4de7d398d5ccf18db4e9112584c;hp=518c11ec420e3460b19c7f37a129b28015dc76ec;hb=fbb30063894dbfb851ee04d89c964bc25ea48dcd;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/lib-crypt/pgppacket.c b/lib-crypt/pgppacket.c index 518c11e..0956076 100644 --- a/lib-crypt/pgppacket.c +++ b/lib-crypt/pgppacket.c @@ -7,16 +7,6 @@ * 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 @@ -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) {