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> |
||
|---|---|---|
| acid | ||
| bin | ||
| dict | ||
| dist | ||
| face | ||
| font | ||
| include | ||
| lib | ||
| log | ||
| lp | ||
| mac | ||
| man | ||
| ndb | ||
| news | ||
| plumb | ||
| postscript | ||
| proto | ||
| sky | ||
| src | ||
| tmac | ||
| troff | ||
| unix | ||
| .gitignore | ||
| CHANGES | ||
| configure | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| INSTALL | ||
| install.txt | ||
| LICENSE | ||
| Makefile | ||
| rcmain | ||
| README.md | ||
| TODO | ||
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
-
Mailing list: http://groups.google.com/group/plan9port-dev
-
Issue tracker: http://code.swtch.com/plan9port/issues/
-
Submitting changes: http://swtch.com/go/codereview
-
Russ Cox rsc@swtch.com