Commits


cmd/htmlroff: fix buffer overflow in t2.c getqarg This is actually from 2016: https://plan9port-review.googlesource.com/c/plan9/+/1590 Change-Id: I6f2a3d71a9dd589eff7ab15b3c1d3997254b3c35


ls: check that pointer is not nil before calling qsort Passing a null pointer to qsort is an error in C (GCC and Clang agree with the standards there, so this is no joke). Change-Id: Ia2b015793a75ea4e85ae8f47da6beead9c4290e6


acme: do not pass null pointers where disallowed The C standards disallow passing null pointers to memmove and memcmp. Change-Id: I1c88c2adbc32a23ef742f206038b8f7c4e0540c7


cmd/rc: fix declarations of some externally linked variables Change-Id: If8fe1afecb9fe55f85e8e5af37521b83e787d718


cb: fix a null pointer dereference Just added a pair of parentheses. I also ran cb on cb.c to beautify the code. This is actually on Gerrit from 2016: https://plan9port-review.googlesource.com/c/plan9/+/1574 Change-Id: I5e234adba0f95c13d6eecb121bf11bba4bf54566


sam: report close error


acme: report close failure during Put


libbio: report Bflush/close error from Bterm


ed: formatting tweak (remove redundant tab). (#301)


page: fix pdf prolog for ghostscript >= 9.27 (#296) Ghostscript 9.27 removed GS_PDF_ProcSet and pdfdict due to a security issue (see https://security-tracker.debian.org/tracker/CVE-2019-3839). This fix was contributed by @onyxperidot (see #279). Fixes #279


ed: replace magic number (077776, i.e. 32766) with NBLK-1. (#300) Temp file size is now declared in an enum; changing it from the default introduces a subtle bug in putline(), which expects it to be 32767. Mask with NBLK-1 instead.


page: fix hang for forward-only postscript files Page was hanging because ghostscript never closes the fd from which we're reading BMP data. We close our end of the pipe so that ghostscript will close its end. Tested with ghostscript version 9.50. Fixes #124


9c, 9l: use $TMPDIR if available (#272) NixOS sandboxed builds (at least on Mac) don't have access to /tmp, and this should be better POSIX.


plumber: add -f (foreground) option (#288) In MacOS, services run by launchd must run in the foreground, since launchd manages forking and other resources.


awk: split record into runes for empty FS (#292) awk was splitting records into bytes instead of runes for empty FS. For example, this was printing only the first byte of the utf-8 encoding of é: echo é | awk 'BEGIN{FS=""}{print $1}' The change just copies how the `split` function handles runes. Originally reported by kris on twitter: https://twitter.com/p9luv/status/1180436083433201665