mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 22:12:20 +00:00
LibCompress: Handle the error state where a dictionary is needed
For zlib is not necessarily an error state but the web standards do not support this feature and the WPT tests explicitly check for this case to be handled as an error.
This commit is contained in:
parent
7a235537e8
commit
81bfb51756
Notes:
github-actions[bot]
2025-06-14 22:28:05 +00:00
Author: https://github.com/tete17
Commit: 81bfb51756
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4759
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/devgianlu
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,9 @@ static Error handle_zlib_error(int ret)
|
|||
switch (ret) {
|
||||
case Z_ERRNO:
|
||||
return Error::from_errno(errno);
|
||||
case Z_NEED_DICT:
|
||||
// Z_NEED_DICT if the input data needed a dictionary
|
||||
return Error::from_string_literal("zlib data needs dictionary");
|
||||
case Z_DATA_ERROR:
|
||||
// Z_DATA_ERROR if the input data was corrupted
|
||||
return Error::from_string_literal("zlib data error");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue