diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/03_unit-tests-Fix-chunk-clear-armel.patch | 19 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/debian/patches/03_unit-tests-Fix-chunk-clear-armel.patch b/debian/patches/03_unit-tests-Fix-chunk-clear-armel.patch new file mode 100644 index 000000000..eb92fac71 --- /dev/null +++ b/debian/patches/03_unit-tests-Fix-chunk-clear-armel.patch @@ -0,0 +1,19 @@ +--- a/src/libstrongswan/tests/suites/test_chunk.c ++++ b/src/libstrongswan/tests/suites/test_chunk.c +@@ -117,10 +117,13 @@ START_TEST(test_chunk_clear) + } + chunk_clear(&chunk); + /* check memory area of freed chunk. We can't use ck_assert() for this +- * test directly, as it might allocate data at the freed area. */ +- for (i = 0; i < 64; i++) ++ * test directly, as it might allocate data at the freed area. comparing ++ * two bytes at once reduces the chances of conflicts if memory got ++ * overwritten already */ ++ for (i = 0; i < 64; i += 2) + { +- if (ptr[i] != 0 && ptr[i] == i) ++ if (ptr[i] != 0 && ptr[i] == i && ++ ptr[i+1] != 0 && ptr[i+1] == i+1) + { + cleared = FALSE; + break; diff --git a/debian/patches/series b/debian/patches/series index 06fa1b5d0..d31e3c5c2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 01_fix-manpages.patch 02_unit-tests-Fix-filtered-enumerator-tests-on-64-bit-b.patch +03_unit-tests-Fix-chunk-clear-armel.patch |