secure: decrease a (stack allocated) buffer size
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 07:45:42 +0000 (09:45 +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 9be405c..2232f14 100644 (file)
@@ -992,7 +992,7 @@ send_rres(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) + sizeof(union olsr_ip_addr)];
     /* Create packet + key cache */
     /* First the challenge received */
     memcpy(checksum_cache, &chal_in, sizeof(chal_in));