| Index: core/fxcrt/fx_extension.cpp
|
| diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
|
| index f1e2583b40ea44c60a9d5f1781227b47d9fe1a13..5b577f745cab4554fde38529c19985a3d7628fe6 100644
|
| --- a/core/fxcrt/fx_extension.cpp
|
| +++ b/core/fxcrt/fx_extension.cpp
|
| @@ -204,7 +204,7 @@ FX_FILESIZE CFX_MemoryStream::GetPosition() {
|
| bool CFX_MemoryStream::ReadBlock(void* buffer,
|
| FX_FILESIZE offset,
|
| size_t size) {
|
| - if (!buffer || !size)
|
| + if (!buffer || !size || offset < 0)
|
| return false;
|
|
|
| FX_SAFE_SIZE_T newPos = size;
|
|
|