mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
raw: tweak seek implementation
libraw uses fseek when doing files, which allows seeking past the end without problems, so do the same, otherwise when we report oss-fuzz issues they say "give me an example to reproduce" and since our seek and their seek don't behave the same it's hard to convince them to fix their code
This commit is contained in:
parent
f4ca3f6783
commit
05bd9397b3
@ -141,7 +141,7 @@ public:
|
||||
if (whence == SEEK_END) {
|
||||
pos = size + o;
|
||||
}
|
||||
if (pos < 0 || pos > size || m_device->isSequential()) {
|
||||
if (pos < 0 || m_device->isSequential()) {
|
||||
return -1;
|
||||
}
|
||||
return m_device->seek(pos) ? 0 : -1;
|
||||
|
Loading…
Reference in New Issue
Block a user