git: catopen(3): align returned errors with POSIX.1-2024

Aaron LI aly at crater.dragonflybsd.org
Mon Oct 5 06:32:14 PDT 2026


commit f2d4fdb18d63197e880adc54f961f225a94125b0
Author: David Bidner <david at crap.solutions>
Date:   Mon Oct 5 21:06:51 2026 +0800

    catopen(3): align returned errors with POSIX.1-2024
    
    Return ENOENT instead of EFTYPE for invalid/empty names, non-existent
    catalogue files, and bad catalogue headers.  Require the complete header
    and reject sizes that exceed mmap() limit.
    
    Also save the errno in handling the open() failure.
    
    Derived-from: FreeBSD (commit 1176390d2d2bbb1e207c840d1f7a66a6ac1096ff)
    Reported-by: pmjdebruijn
    Bug: https://bugs.dragonflybsd.org/issues/3393

Summary of changes:
 lib/libc/nls/catopen.3 | 12 ++++--------
 lib/libc/nls/msgcat.c  | 41 ++++++++++++++++++++++++-----------------
 2 files changed, 28 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f2d4fdb18d63197e880adc54f961f225a94125b0


-- 
DragonFly BSD source repository


More information about the Commits mailing list