summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-06-12 13:28:26 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-06-12 14:07:23 +0100
commit202dac6e20f75e87edab3368bb0882d59494d864 (patch)
treec70322aa0d6271e041bb7dfc4610563500576d87 /smoketest
parent4ed5bacc86e0137d9ace5a2ceda09c2393716793 (diff)
liblok: check new methods via macros on nSize, not by de-referencing.
We can't check for NULL from beyond the end of a smaller structure. Change-Id: Id3754bf747c402cf0d767eda5fd4b5ad6b5789e9
Diffstat (limited to 'smoketest')
-rw-r--r--smoketest/libtest.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 07a13ec10edd..2316b8c24184 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -75,6 +75,16 @@ int main (int argc, char **argv)
return -1;
}
+ if (!LIBREOFFICEKIT_DOCUMENT_HAS(pDocument->get(), saveAsWithOptions))
+ {
+ fprintf( stderr, "using obsolete LibreOffice %d + %d vs. %d\n",
+ (int)((unsigned char *)&((LibreOfficeKitDocument *) 0)->saveAsWithOptions),
+ (int)sizeof ((LibreOfficeKitDocument *) 0)->saveAsWithOptions,
+ pDocument->get()->nSize );
+ return -1;
+ }
+
+
end = getTimeMS();
fprintf( stderr, "load time: %ld ms\n", (end-start) );
start = end;