diff options
author | NRK <nrk@disroot.org> | 2022-10-21 08:02:54 +0200 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2022-10-21 08:02:54 +0200 |
commit | e197429489e098b2a0190330606f7022d3909644 (patch) | |
tree | 9098405dc62fb64d37a96a82642f13f736af0f83 /etc/woodpecker/build.yml | |
parent | b11384a6942cdf3c6b6f55e0dcc0a438eff7158a (diff) | |
download | nsxiv-e197429489e098b2a0190330606f7022d3909644.tar.zst |
img_open: explicitly decode image data immediately (#380)
the way `imlib_load_image()` works, is that it only does a lightweight
signature/metadata check. it doesn't actually decode the image. which
means that a file that has valid metadata but invalid content would get
loaded successfully.
`imlib_image_get_data_for_reading_only()` basically forces imlib to
decode the data, and thus reveal any malformed images so we can reject
it (see commit f0266187).
however, this is a spurious way of achieving the goal at hand. imlib2
already offers an `_immediately` variant which decodes the data
immediately. so just use that instead of spuriously using the "get_data"
function to force a decode.
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/380
Reviewed-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Diffstat (limited to 'etc/woodpecker/build.yml')
0 files changed, 0 insertions, 0 deletions