mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
cbab7f7268
localedef currently blindly trust the archive header. When passed an archive file with the wrong endianess, this leads to a segmentation fault: $ localedef --big-endian --list-archive /usr/lib/locale/locale-archive Segmentation fault (core dumped) When passed non-archive files, asserts are reported on the best case, but sometimes it can lead to a segmentation fault: $ localedef --list-archive /bin/true localedef: programs/locarchive.c:1643: show_archive_content: Assertion `used < GET (head->namehash_used)' failed. Aborted (core dumped) $ localedef --list-archive /usr/lib/locale/C.utf8/LC_COLLATE Segmentation fault (core dumped) This patch improves the user experience by looking at the magic value, which is always written, but never checked. It should still be possible to trigger a segmentation fault with crafted files, but this already catch many cases. |
||
---|---|---|
.. | ||
3level.h | ||
charmap-dir.c | ||
charmap-dir.h | ||
charmap-kw.gperf | ||
charmap-kw.h | ||
charmap.c | ||
charmap.h | ||
config.h | ||
ld-address.c | ||
ld-collate.c | ||
ld-ctype.c | ||
ld-identification.c | ||
ld-measurement.c | ||
ld-messages.c | ||
ld-monetary.c | ||
ld-name.c | ||
ld-numeric.c | ||
ld-paper.c | ||
ld-telephone.c | ||
ld-time.c | ||
linereader.c | ||
linereader.h | ||
locale-spec.c | ||
locale.c | ||
localedef.c | ||
localedef.h | ||
locarchive.c | ||
locfile-kw.gperf | ||
locfile-kw.h | ||
locfile-token.h | ||
locfile.c | ||
locfile.h | ||
record-status.c | ||
record-status.h | ||
repertoire.c | ||
repertoire.h | ||
simple-hash.c | ||
simple-hash.h | ||
xasprintf.c | ||
xmalloc.c | ||
xstrdup.c |