+9 September 2016: Wouter
+ - Fix #831: workaround for spurious fread_chk warning against petal.c
+
5 September 2016: Ralph
- Take configured minimum TTL into consideration when reducing TTL
to original TTL from RRSIG.
provide_file_chunked(SSL* ssl, char* fname)
{
char buf[16384];
+ char* tmpbuf = NULL;
char* at = buf;
size_t avail = sizeof(buf);
size_t r;
}
do {
- char tmpbuf[sizeof(buf)];
+ size_t red;
+ free(tmpbuf);
+ tmpbuf = malloc(avail-16);
+ if(!tmpbuf)
+ break;
/* read chunk; space-16 for xxxxCRLF..CRLF0CRLFCRLF (3 spare)*/
- size_t red = in?fread(tmpbuf, 1, avail-16, in):0;
+ red = in?fread(tmpbuf, 1, avail-16, in):0;
/* prepare chunk */
snprintf(at, avail, "%x\r\n", (unsigned)red);
r = strlen(at);
avail = sizeof(buf);
} while(in && !feof(in) && !ferror(in));
+ free(tmpbuf);
if(in) fclose(in);
}