- Fix detection of some non-UTF-8 files with a encoding stanza in them (e.g.
coding: iso-8859-2
)
- Fix out-of-bounds reads loading an empty UTF-16 buffer with BOM (yeah, really)
- Fix silently truncating at the first NUL in some case (part of #3700)
- Fix handling of non-UTF-8 data that start with a UTF-8 BOM
Note: this still doesn't load data after the first NUL byte, but at least now it will always properly warn as we supposedly were already doing.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3716
Commit Summary
- ae01d30 Add some basic tests for encoding detection and conversion
- b23201c encodings: Fix detection of non-UTF-8 inline encodings
- 187e046 Remove unused code
- e3177c8 Add basic tests for UTF-16* and UTF-32*
- a0ed61a Add some basic UTF-7 tests
- 65250c8 Add some tests for empty data with BOM
- 3d47617 Fix silently truncating files with NULs
- cb68cdb Refactor to remove duplication, lower assumptions and improve safety
File Changes
(5 files)
Patch Links:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3716@github.com>