Julius Schwartzenberg : avifil32/tests: Test corrupt avi list magic.
Alexandre Julliard
julliard at winehq.org
Mon Jan 11 15:59:36 CST 2010
Module: wine
Branch: master
Commit: ef19d85229c746f6fc7df3fc2ccd7bf0df89bcec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef19d85229c746f6fc7df3fc2ccd7bf0df89bcec
Author: Julius Schwartzenberg <julius.schwartzenberg at gmail.com>
Date: Sun Jan 10 01:54:19 2010 +0100
avifil32/tests: Test corrupt avi list magic.
---
dlls/avifil32/tests/api.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c
index 13c06db..7cc0c1b 100644
--- a/dlls/avifil32/tests/api.c
+++ b/dlls/avifil32/tests/api.c
@@ -354,6 +354,27 @@ static void test_default_data(void)
ok(DeleteFile(filename) !=0, "Deleting file %s failed", filename);
}
+static void test_amh_corruption(void)
+{
+ COMMON_AVI_HEADERS cah;
+ char filename[MAX_PATH];
+ PAVIFILE pFile;
+ int res;
+
+ GetTempPath(MAX_PATH, filename);
+ strcpy(filename+strlen(filename), testfilename);
+
+ /* Make sure only AVI files with the proper headers will be loaded */
+ init_test_struct(&cah);
+ cah.fh[3] = mmioFOURCC('A', 'V', 'i', ' ');
+
+ create_avi_file(&cah, filename);
+ res = AVIFileOpen(&pFile, filename, OF_SHARE_DENY_WRITE, 0L);
+ ok(res != 0, "Able to open file: error=%u\n", res);
+
+ ok(DeleteFile(filename) !=0, "Deleting file %s failed\n", filename);
+}
+
/* ########################### */
START_TEST(api)
@@ -362,6 +383,7 @@ START_TEST(api)
AVIFileInit();
test_AVISaveOptions();
test_default_data();
+ test_amh_corruption();
AVIFileExit();
}
More information about the wine-cvs
mailing list