aboutsummaryrefslogtreecommitdiff
path: root/src/libdraw/font.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-08libdraw: replace hand-rolled realloc, preventing buffer overflow.Ray Lai1-3/+1
The original buffer is f->nsubf*sizeof *subf bytes (oldsize) large. Once it's full, a new buffer of (f->nsubf+DSUBF)*sizeof *subf (newsize) is mallocated. Unfortunately memmove() reads (newsize) bytes from the original (oldsize) buffer, causing a buffer overflow. By switching to realloc(), we don't need to do buffer size calculation, memmoving, and freeing of the original buffer. Change-Id: Ibf85bc06abe1c8275b11acb1d7d346a14291d2cd Reviewed-on: https://plan9port-review.googlesource.com/1520 Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2005-07-13more places where display can be nilrsc1-1/+1
2005-05-12handle arbitrary length names in subfontname.rsc1-3/+5
handle overflow in offset computation in font.c
2004-04-25make it possible to access fonts without a display.rsc1-3/+10
2004-03-05Amazingly picky bug fixes from Valgrind.rsc1-1/+1
2003-09-30Initial revisionrsc1-0/+401