secure: decrease a (stack allocated) buffer size
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 07:57:53 +0000 (09:57 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 08:52:48 +0000 (10:52 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/secure/src/olsrd_secure.c

index 66b0c47..c865477 100644 (file)
@@ -920,7 +920,7 @@ send_cres(struct interface *olsr_if, union olsr_ip_addr *to, union olsr_ip_addr
   /* Create digest of received challenge + IP */
 
   {
-    uint8_t checksum_cache[1512 + KEYLENGTH];
+    uint8_t checksum_cache[sizeof(chal_in) + olsr_cnf->ipsize];
     /* Create packet + key cache */
     /* First the challenge received */
     memcpy(checksum_cache, &chal_in, sizeof(chal_in));