HomeFreeBSD

libc: fix access mode tests in fmemopen(3)

Description

libc: fix access mode tests in fmemopen(3)

Previously a stream opened as read-only could be written to. Add a test
case for the fix.

Also correct another incorrect access mode check that worked by
accident, and improve the tests for that.

PR: 281953
Reported by: Erkki Moorits, fuz
Reviewed by: fuz, khng (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47265

Details

Provenance
emasteAuthored on Oct 23 2024, 1:41 PM
Reviewer
fuz
Differential Revision
D47265: libc: fix WRONLY/RDONLY test in fmemopen
Parents
rG419249c1cacc: Revert "LINT: Add mac_do"
Branches
Unknown
Tags
Unknown