plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 0cc1faf015a253ef64b97a8453b6fc959c0ee512
parent fdcf3d70c24886dddb5fd7052dfada67d33d5c75
Author: Russ Cox <rsc@swtch.com>
Date:   Thu, 14 Jan 2021 09:59:03 -0500

lib9: reject postnote with special pids

Diffstat:
Msrc/lib9/postnote.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/lib9/postnote.c b/src/lib9/postnote.c @@ -18,6 +18,11 @@ postnote(int who, int pid, char *msg) return -1; } + if(pid <= 0){ + werrstr("bad pid in postnote"); + return -1; + } + switch(who){ default: werrstr("bad who in postnote");