serenity/Tests
Nico Weber 9495f64f91 LibPDF: Improve hex string parsing
A local (non-public) PDF I have lying around contains this in
a page's operator stream:

```
[<00b4003e> 3 <002600480051> 3 <005700550044004f0003> -29
<00330044> 3 <0055> -3 <004e0040> 4 <0003> -29 <004c00560003> -31
<0057004b> 4 <00480003> -37 <0050
>] TJ
```

That is, there's a newline in a hexstring after a character.

This led to `Parser error at offset 5184: Unexpected character`.

The spec says in 3.2.3 String Objects, Hexadecimal Strings:
"""Each pair of hexadecimal digits defines one byte of the string.
White-space characters (such as space, tab, carriage return, line feed,
and form feed) are ignored."""

But we didn't ignore whitespace before or after a character, only
in between the bytes.

The spec also says:
"""If the final digit of a hexadecimal string is missing—that is, if
there is an odd number of digits—the final digit is assumed to be 0."""

In that case, we were skipping the closing `>` twice -- or, more
accurately, we ignored the character after it too. This has been
wrong all the way back in #6974.

Add a test that fails if either of the two changes isn't present.
2024-01-02 22:13:21 +01:00
..
AK AK+LibWeb: Use segmented vector to store commands in RecordingPainter 2023-12-30 23:02:46 +01:00
JSSpecCompiler Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Kernel Kernel: Ensure sockets_by_tuple table entry is up to date on connect 2023-12-26 18:36:43 +01:00
LibAudio Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibC Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCompress LibCompress: Add a PackBits decoder 2023-12-27 17:40:11 +01:00
LibCore LibCore: Fix compilation of infallible Promise::when_resolved handlers 2024-01-01 10:11:45 +01:00
LibCpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCrypto Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibDiff LibDiff: Fix wrong index used when prepending context lines 2023-09-11 12:10:50 +01:00
LibEDID AK: Rename AK::FixedPoint::round to rint and fix a rounding error 2023-08-14 14:20:45 -06:00
LibELF Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGfx LibGfx/TIFF: Add AdobeDeflate compression support 2023-12-29 20:12:07 +01:00
LibGL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGLSL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibIMAP Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibJS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibLocale LibLocale+LibJS+ClockSettings: Make date time format APIs infallible 2023-08-23 05:29:21 +02:00
LibMarkdown Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibPDF LibPDF: Improve hex string parsing 2024-01-02 22:13:21 +01:00
LibRegex LibRegex: Error out on Eof when parsing nonempty class range elements 2023-12-31 15:36:42 +01:00
LibSQL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTest LibTest: Add a suite of tests for the generators 2023-10-26 17:26:52 -06:00
LibTextCodec LibTextCodec+Everywhere: Port Decoders to new Strings 2023-02-19 17:15:47 +01:00
LibThreading LibThreading: Improve resiliancy of timed threading tests 2023-05-24 00:25:35 +02:00
LibTimeZone LibTimeZone+Userland: Change timezone functions to use UnixDateTime 2023-05-24 23:18:07 +02:00
LibTLS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTTF LibGfx/OpenType: Ensure Cmap subtable offset is within expected range 2023-11-11 22:20:17 +01:00
LibUnicode LibUnicode: Add IDNA::to_ascii 2023-12-10 08:04:58 -05:00
LibVideo Tests: Add regression tests for fixed OSS-Fuzz test cases 2023-10-24 07:30:04 +02:00
LibWasm Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibWeb LibWeb: Do not require box to be positioned to create stacking context 2024-01-02 21:45:05 +01:00
LibWebView LibWebView: Avoid trying to break a schemeless URL into renderable parts 2023-12-04 14:47:09 +00:00
LibXML LibXML: Actually append resolved references when parsing content 2023-07-23 16:09:12 +02:00
Spreadsheet Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
UserspaceEmulator Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
Utilities Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
CMakeLists.txt LibWebView: Protect URL highlighting against partially-typed URLs 2023-10-28 19:03:19 +02:00