Skip to content

Commit 34099ba

Browse files
andreas.larssonJarno Lamsa
authored andcommitted
Added missing lwip_md5_init and lwip_md5_free as suggested by:
#6003 (comment)
1 parent 67772a5 commit 34099ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_tcp_isn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ lwip_hook_tcp_isn(const void *local_ip_ptr, u16_t local_port,
178178
/* The secret and padding are already filled in. */
179179

180180
/* Generate the hash, using MD5. */
181+
lwip_md5_init(&ctx);
181182
lwip_md5_starts(&ctx);
182183
lwip_md5_update(&ctx, input, sizeof(input));
183184
lwip_md5_finish(&ctx, output);
185+
lwip_md5_free(&ctx);
184186

185187
/* Arbitrarily take the first 32 bits from the generated hash. */
186188
MEMCPY(&isn, output, sizeof(isn));

0 commit comments

Comments
 (0)