plan9port/src
Ray Lai 94b38bdb72 libdraw: replace hand-rolled realloc, preventing buffer overflow.
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>
2017-04-08 00:06:42 +00:00
..
cmd 9term: Add missing parentheses, preventing buffer overflow. 2017-04-08 00:04:32 +00:00
lib9 include: define _DEFAULT_SOURCE 2016-11-20 09:37:58 +00:00
lib9p fix clang warnings reported by Tuncer Ayaz 2012-10-21 11:25:08 -04:00
lib9pclient
libacme
libauth
libauthsrv
libavl venti: import changes from plan 9 2011-06-02 09:33:56 -04:00
libbin
libbio
libcomplete
libdisk
libdiskfs fix clang warnings reported by Tuncer Ayaz 2012-10-21 11:25:08 -04:00
libdraw libdraw: replace hand-rolled realloc, preventing buffer overflow. 2017-04-08 00:06:42 +00:00
libflate
libframe libdraw, libframe, acme: fix, guard against inverted range in textsetselect 2014-12-02 01:18:40 +00:00
libgeometry
libhtml silence more warnings 2012-10-21 12:04:56 -04:00
libhttpd
libip all: DragonFly port. 2014-02-27 23:17:47 -05:00
libmach all: fix or silence all INSTALL warnings on macOS 2017-01-06 21:37:31 +00:00
libmemdraw libmemdraw: fix int size bug 2012-10-21 12:08:49 -04:00
libmemlayer
libmp all: linux/arm64 port 2015-06-03 15:34:38 +00:00
libmux
libndb fix clang 3.4 warnings and ignore uninteresting ones 2014-10-21 14:22:12 +02:00
libplumb
libregexp all: fix or silence all INSTALL warnings on macOS 2017-01-06 21:37:31 +00:00
libsec all: linux/arm64 port 2015-06-03 15:34:38 +00:00
libString
libsunrpc silence more warnings 2012-10-21 12:04:56 -04:00
libthread libthread: add threadspawnd 2012-10-22 12:32:09 -04:00
libventi fix gcc 4.8 warnings 2014-03-03 22:30:34 +01:00
make2mk
mk2make
mkcommon
mkdirs
mkfile fix INSTALL warnings 2012-05-29 15:11:14 -04:00
mkhdr all: linux/arm64 port 2015-06-03 15:34:38 +00:00
mklib
mkmany
mkmk.sh
mkone
mksyslib