[PATCH 1/3] windowscodecs: Test for png codec seeking too far
Viktor Semykin
thesame.ml at gmail.com
Thu Mar 30 11:52:12 CDT 2017
Signed-off-by: Viktor Semykin <thesame.ml at gmail.com>
---
dlls/windowscodecs/tests/pngformat.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c
index 34cb533335..68a775c8f9 100644
--- a/dlls/windowscodecs/tests/pngformat.c
+++ b/dlls/windowscodecs/tests/pngformat.c
@@ -284,6 +284,8 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
IStream *stream;
GUID format;
LONG refcount;
+ ULARGE_INTEGER pos;
+ LARGE_INTEGER zero;
hmem = GlobalAlloc(0, image_size);
data = GlobalLock(hmem);
@@ -302,6 +304,11 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
ok(IsEqualGUID(&format, &GUID_ContainerFormatPng),
"wrong container format %s\n", wine_dbgstr_guid(&format));
+ zero.QuadPart = 0;
+ IStream_Seek (stream, zero, STREAM_SEEK_CUR, &pos);
+ todo_wine ok(pos.QuadPart < image_size, "seek beyond the end of stream: %lu >= %u\n",
+ pos.QuadPart, image_size);
+
refcount = IStream_Release(stream);
ok(refcount > 0, "expected stream refcount > 0\n");
--
2.12.1
More information about the wine-patches
mailing list