mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-17 17:24:54 +00:00
Throw an exception if seeking to invalid positions is requested in the memory IO class.
This commit is contained in:
parent
11ba305d6e
commit
c0f2ee61ee
@ -980,12 +980,10 @@ mm_mem_io_c::setFilePointer(int64 offset,
|
|||||||
else
|
else
|
||||||
npos = pos + offset;
|
npos = pos + offset;
|
||||||
|
|
||||||
if (npos < 0)
|
if ((0 <= npos) && (mem_size >= npos))
|
||||||
pos = 0;
|
|
||||||
else if (npos >= mem_size)
|
|
||||||
pos = mem_size;
|
|
||||||
else
|
|
||||||
pos = npos;
|
pos = npos;
|
||||||
|
else
|
||||||
|
throw mm_io_seek_error_c();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
uint32
|
||||||
|
Loading…
Reference in New Issue
Block a user