Let malloc return an error as opposed of panicking when sysctl
authoranton <anton@openbsd.org>
Tue, 21 Dec 2021 06:12:49 +0000 (06:12 +0000)
committeranton <anton@openbsd.org>
Tue, 21 Dec 2021 06:12:49 +0000 (06:12 +0000)
commit0b7f5aec6317de40aa7229293c1a8677476faeba
tree91d101c8ee5ef281d87ad4918098b74c6f21e3a5
parent7a09fc7701bc987e2c6b18e4a7f8191d40752396
Let malloc return an error as opposed of panicking when sysctl
kern.shminfo.shmseg is set to something ridiculously large.

ok kettenis@ millert@

Reported-by: syzbot+9f1b201cdbc97b19c7f5@syzkaller.appspotmail.com
sys/kern/sysv_shm.c