ObjFW  Check-in [6fbc3b18c7]

Overview
Comment:Allow strings to contain \0

In order to not accidentally have C strings with \0, an
OFInvalidEncodingException is thrown when trying to get a C string for a
string that contains \0.

In order to get a C string with \0 anyway, a new method
-[insecureCStringWithEncoding:] is added.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6fbc3b18c717dc97bc0169d28f19c0fcb629d6b69f710975d1620a8b6f4ed8e7
User & Date: js on 2024-10-27 22:27:20
Other Links: manifest | tags
References
2024-10-27
22:37 Fixed ticket [134d90a996]: String \0 safety plus 4 other changes artifact: 376510cc34 user: js
Context
2024-10-27
23:38
OFSystemInfo: Fix \0 in +[CPUModel] on macOS check-in: e061c2b66e user: js tags: trunk
22:27
Allow strings to contain \0 check-in: 6fbc3b18c7 user: js tags: trunk
18:38
Remove nullable in .m files check-in: 7d1275cb49 user: js tags: trunk
Changes

Modified src/OFConstantString.m from [e8a18a09ea] to [03e8d1030f].    [diff]

Modified src/OFMutableUTF8String.m from [521dc8393f] to [027a5197e3].    [diff]

Modified src/OFSequencedPacketSocket.h from [68ab17bfbd] to [fa3cdbb7dd].    [diff]

Modified src/OFString+JSONParsing.m from [87273342cc] to [08913e2453].    [diff]

Modified src/OFString.h from [5672da673b] to [dfff2d8730].    [diff]

Modified src/OFString.m from [0a6f9138dd] to [235c6ba0c3].    [diff]

Modified src/OFTCPSocket.h from [3d8f48f978] to [c7a38bf638].    [diff]

Modified src/OFUTF8String+Private.h from [ccfb13bd6d] to [84456dce78].    [diff]

Modified src/OFUTF8String.h from [fe9a65353f] to [06f893bbd3].    [diff]

Modified src/OFUTF8String.m from [eb22322b98] to [731d0242b9].    [diff]

Modified src/encodings/codepage-437.m from [0e1d4e03c0] to [ae0ed7f16e].    [diff]

Modified src/encodings/codepage-850.m from [116375a4bc] to [fa7a3fd8d6].    [diff]

Modified src/encodings/codepage-852.m from [2e105e7181] to [555c3df35d].    [diff]

Modified src/encodings/codepage-858.m from [0a443ea671] to [2c6eb1a5f6].    [diff]

Modified src/encodings/iso-8859-15.m from [25e41edd49] to [24cf09fca0].    [diff]

Modified src/encodings/iso-8859-2.m from [bd3f7dada7] to [a88030091f].    [diff]

Modified src/encodings/iso-8859-3.m from [bc9ab876ae] to [bf5185ce65].    [diff]

Modified src/encodings/koi8-r.m from [7d684b26ac] to [47c8151c6a].    [diff]

Modified src/encodings/koi8-u.m from [0f9ae48dcf] to [ae62fae518].    [diff]

Modified src/encodings/mac-roman.m from [48622afc6e] to [6cd071203c].    [diff]

Modified src/encodings/windows-1250.m from [66d83a46d2] to [bfff0cf391].    [diff]

Modified src/encodings/windows-1251.m from [fb08e37f56] to [4405821c2a].    [diff]

Modified src/encodings/windows-1252.m from [1577a4fe9c] to [0d87252cdf].    [diff]

Modified tests/OFJSONTests.m from [2ee8657285] to [4578e0b89d].    [diff]