[DragonFlyBSD - Bug #3393] (libc) catopen(3): align returned errors with IEEE Std 1003.1™-2024

sigttou bugtracker-admin at leaf.dragonflybsd.org
Sun Oct 4 22:49:44 PDT 2026


Issue #3393 has been updated by sigttou.

File 0001-libc-catalogue-errors-cache.patch added

This combines the two FreeBSD changes linked here: Konstantin Belousov's error-handling change and Xin LI's cache-reference fix, whose upstream race report credits Henry Hu.

It returns ENOENT for empty names and bad catalogue headers, checks the full header size and the descriptor's int size limit, and preserves the original open/fstat error if failure-cache allocation fails. Cache reference counts use atomic operations; failed string allocations are checked before entries are stored.

----------------------------------------
Bug #3393: (libc) catopen(3): align returned errors with IEEE Std 1003.1™-2024
http://bugs.dragonflybsd.org/issues/3393#change-14775

* Author: pmjdebruijn
* Status: New
* Priority: Low
* Category: Userland
* Target version: 6.6
* Start date: 2026-01-22
----------------------------------------
Ref: https://reviews.freebsd.org/D47413

* Invalid/non-existent/unable to use message catalog file should result in ENOENT, and not in EFTYPE.
* Added detection of several cases of wrong file format due to length [*].
* Update man page.

Patch: https://cgit.freebsd.org/src/patch/lib/libc/nls/msgcat.c?id=1176390d2d2bbb1e207c840d1f7a66a6ac1096ff (patch (with fuzz) applies and compiles)

There are some other "upstream changes" to the nls code as well, so cherry-picking this patch vs syncing the nls codebase is a tradeoff probably worth considering...

---Files--------------------------------
0001-libc-catalogue-errors-cache.patch (7.15 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list