changeset 233:d773e540dec3

Add checks for invalid input
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 28 Mar 2014 11:33:39 +0000
parents 774e944c395b
children a7317252a27c
files ui/tests/commontest.cpp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/tests/commontest.cpp	Fri Mar 28 10:50:14 2014 +0100
+++ b/ui/tests/commontest.cpp	Fri Mar 28 11:33:39 2014 +0000
@@ -24,6 +24,13 @@
     QVERIFY(data_size == 1000);
     QVERIFY(data);
 
+    ret = str_base64_decode(&data, &data_size, (char *)ba.constData(), ba.size());
+    QVERIFY(ret != 0);
+
+    const char * foo = "bla";
+    ret = str_base64_decode(&data, &data_size, (char *)foo, 3);
+    QVERIFY(ret != 0);
+
     for (size_t i = 0; i < data_size; i++) {
         QVERIFY(garbage[i] == data[i]);
     }

http://wald.intevation.org/projects/trustbridge/