Commit Briefs
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
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
9l: support Linux version 5.0+ (#274)
Update 9l to support Linux 5.x.
hoc: don't nest calls to follow() when lexing ++/+= and --/-= (#287)
The code had a nested use of the follow() function that could cause +=+ and -=- to register as ++ and --. The first follow() to execute could consume a character and match and then the second follow() could consume another character and match. For example i-=-10 would result in a syntax error and i-=- would decrement i.
upas/nfs: fix null date when message is sent to plumber (#263)
When fetching, messages are sent to plumber as soon as the ENVELOPE part is read. The date field of the message is sent when the INTERNALDATE part is read and there is no guarantee that this will be read before the ENVELOPE. This bug can be observed when using faces(1) which will retrieve messages with a null date and then always display a 'Jan 1' date instead of the correct one. The fix is to simply send the message to plumber after having read all parts, thus ensuring the message is complete.