mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:57:44 +00:00
LibGfx: Misc 32-bit build fixes
This commit is contained in:
parent
79022090bf
commit
8ebddc1ff6
3 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ ErrorOr<BoxList> Reader::read_entire_file()
|
||||||
|
|
||||||
while (!m_stream->is_eof()) {
|
while (!m_stream->is_eof()) {
|
||||||
auto box_header = TRY(read_box_header(*m_stream));
|
auto box_header = TRY(read_box_header(*m_stream));
|
||||||
BoxStream box_stream { *m_stream, box_header.contents_size };
|
BoxStream box_stream { *m_stream, static_cast<size_t>(box_header.contents_size) };
|
||||||
|
|
||||||
switch (box_header.type) {
|
switch (box_header.type) {
|
||||||
case BoxType::FileTypeBox:
|
case BoxType::FileTypeBox:
|
||||||
|
|
|
@ -1333,7 +1333,7 @@ private:
|
||||||
|
|
||||||
auto const result = ((token << n | TRY(stream.read_bits(n))) << config.lsb_in_token) | low_bits;
|
auto const result = ((token << n | TRY(stream.read_bits(n))) << config.lsb_in_token) | low_bits;
|
||||||
|
|
||||||
VERIFY(result < (1ul << 32));
|
VERIFY(result < (1ull << 32));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,7 +454,7 @@ static ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_image(ImageKind ima
|
||||||
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference distance out of bounds");
|
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference distance out of bounds");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end - pixel < length) {
|
if (end - pixel < static_cast<ptrdiff_t>(length)) {
|
||||||
dbgln_if(WEBP_DEBUG, "invalid length, {} < {}", end - pixel, length);
|
dbgln_if(WEBP_DEBUG, "invalid length, {} < {}", end - pixel, length);
|
||||||
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference length out of bounds");
|
return Error::from_string_literal("WebPImageDecoderPlugin: Backward reference length out of bounds");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue