From 11d8db0d38b833e2b2d10cb406bc582e2380f04d Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 26 Jan 2013 01:15:15 +0100 Subject: [PATCH] Properly initialize ICAO cached addresses hash table. --- dump1090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump1090.c b/dump1090.c index 3ddcc11..4f446f8 100644 --- a/dump1090.c +++ b/dump1090.c @@ -294,7 +294,7 @@ void modesInit(void) { /* Allocate the ICAO address cache. We use two uint32_t for every * entry because it's a addr / timestamp pair for every entry. */ Modes.icao_cache = malloc(sizeof(uint32_t)*MODES_ICAO_CACHE_LEN*2); - memset(Modes.icao_cache,0,sizeof(Modes.icao_cache)); + memset(Modes.icao_cache,0,sizeof(uint32_t)*MODES_ICAO_CACHE_LEN*2); Modes.aircrafts = NULL; Modes.interactive_last_update = 0; if ((Modes.data = malloc(Modes.data_len)) == NULL ||