do not call fmemopen(3) with a zero size argument
commit27ae6a548a31420c571ee11d199c7625d0e8d731
authorStefan Sperling <stsp@stsp.name>
Mon, 11 Nov 2024 22:32:21 +0000 (11 22:32 +0000)
committerThomas Adam <thomas@xteddy.org>
Thu, 14 Nov 2024 16:16:05 +0000 (14 16:16 +0000)
tree07778b0d108a184a8709fcd98897df8d61a10810
parentdaf4cb35f2cef3ba7b74aa8900e9c762e48a32ec
do not call fmemopen(3) with a zero size argument

Calling fmemopen(3) with a size of zero leads to an "Invalid argument" error.
One symptom of this issue are failing gotd notifications:
  gotd[48539]: render notification: fmemopen: Invalid argument
Add an email notification test case which triggers the above error.

Reported by Mischa Peters
lib/object_open_io.c
lib/object_open_privsep.c
regress/gotd/email_notification.sh