No description
Find a file
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
acid merge 2012-03-05 16:36:31 -05:00
bin all: fix or silence all INSTALL warnings on macOS 2017-01-06 21:37:31 +00:00
dict now with hget 2005-07-18 22:52:05 +00:00
dist all: linux/mips port 2015-06-03 15:34:06 +00:00
face faces for lp. 2005-09-13 01:24:50 +00:00
font font: s/10/11 in ascent for unicode.7x13.font 2016-04-18 18:07:22 +00:00
include 9term, win: work around bsd linker nonsense 2017-01-06 20:20:33 +00:00
lib all: fix or silence all INSTALL warnings on macOS 2017-01-06 21:37:31 +00:00
log ignore everything 2005-02-13 22:09:54 +00:00
lp lp: move devices to devices.sample 2009-04-30 07:28:37 -07:00
mac devdraw: plumb drag-n-dropped files 2015-06-03 15:26:27 +00:00
mail merge 2007-11-27 15:39:06 -05:00
man man: document font syntaxes 2015-02-17 20:53:15 +00:00
ndb ndb/local: remove rsc-specific entries (oops) 2008-06-04 13:28:05 -04:00
news
plumb acme: scroll a directory window when navigating if: 2013-10-22 16:47:48 -07:00
postscript troff: yet another case problem (OS X) 2008-02-01 07:54:19 -05:00
proto
sky add here 2005-01-27 19:28:22 +00:00
src libdraw: replace hand-rolled realloc, preventing buffer overflow. 2017-04-08 00:06:42 +00:00
tmac tmac.an: insert spaces after .?? request names 2008-11-11 11:01:03 -08:00
troff tr2post: rename charlib files to not be case-dependent (OS X) 2008-01-31 16:58:38 -05:00
unix unix: move Makefile so that it cannot be run accidentally 2009-08-24 07:53:01 -07:00
.gitignore all: update for Git 2014-11-16 21:21:28 -05:00
CHANGES CHANGES: add pointer to web version 2008-05-10 13:38:21 -04:00
configure For annoying people like Uriel. 2005-11-25 13:18:11 +00:00
CONTRIBUTING.md CONTRIBUTING.md: fix link to codereview(1) 2014-12-02 03:14:40 +00:00
CONTRIBUTORS venti/copy: fix bug writing directories that zero truncate 2014-10-21 07:25:13 -04:00
INSTALL INSTALL: append /usr/X11R6/include and /usr/X11R6/include/freetype2 to 2015-11-10 03:30:25 +00:00
install.txt install.txt: regenerate (9 man 1 intro >install.txt) 2014-12-02 01:24:34 +00:00
LICENSE allow less restricted use of plan9port-specific code 2009-08-14 21:08:23 -07:00
Makefile For annoying people like Uriel. 2005-11-25 13:18:11 +00:00
rcmain rcmain: use new $termprog variable 2013-08-13 12:46:38 -04:00
README.md codereview: make commit -a the default; warn about uncommitted changes at upload 2014-11-16 21:48:16 -05:00
TODO Note 9P2000.u 2005-08-31 04:00:14 +00:00

This is a port of many Plan 9 libraries and programs to Unix.

Installation

To install, run ./INSTALL. It builds mk and then uses mk to run the rest of the installation.

For more details, see install(1), at install.txt in this directory and at http://swtch.com/plan9port/man/man1/install.html.

Documentation

See http://swtch.com/plan9port/man/ for more documentation. (Documentation is also in this tree, but you need to run a successful install first. After that, "9 man 1 intro".)

Intro(1) contains a list of man pages that describe new features or differences from Plan 9.

Helping out

If you'd like to help out, great! The TODO file contains a small list.

If you port this code to other architectures, please share your changes so others can benefit.

Please use codereview(1) to prepare patches.

Git

You can use Git to keep your local copy up-to-date as we make changes and fix bugs. See the git(1) man page here ("9 man git") for details on using Git.

Contact