Commit abf3870c authored by Niels Möller's avatar Niels Möller

des-compat-test: Fix out of bounds memory read.

parent e5d11c27
2014-06-04 Niels Möller <>
* testsuite/des-compat-test.c (test_main): Fixed out of bounds
memory read, reported by Nikos Mavrogiannopoulos.
* nettle-write.h: Include <stddef.h>, fixing compilation on
......@@ -358,7 +358,7 @@ test_main(void)
printf("Key error %2d:%d\n",i+2,j);
if ((j=des_key_sched(&key_data[i+2],ks3)) != 0)
if (i+2 < NUM_TESTS && (j=des_key_sched(&key_data[i+2],ks3)) != 0)
printf("Key error %2d:%d\n",i+3,j);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment