SEC: Add comment to warn about stack overflow.
authorrasky <rasky@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 29 Sep 2010 21:43:06 +0000 (21:43 +0000)
committerrasky <rasky@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 29 Sep 2010 21:43:06 +0000 (21:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4374 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/sec/cipher/blowfish_test.c

index 0a041e62a2c4916dba4c07097c4b4f3e98e10e14..20b8f66eb394975008e2e3892aaaa7fe9ee8f13c 100644 (file)
@@ -166,9 +166,11 @@ int blowfish_testTearDown(void)
 
 int blowfish_testRun(void)
 {
+       // NOTE: we use a static variable here to avoid stack overflows due to the huge
+       // context structure of blowfish.
        static BlowfishContext ctx;
        blowfish_init(&ctx);
-       BlockCipher *c = &ctx.c; //blowfish_stackinit();
+       BlockCipher *c = &ctx.c;
 
        for (int i=0; i<NUM_VARIABLE_KEY_TESTS; ++i)
        {