From 5fae91432646637c4f8d10c6102b76068f889226 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Wed, 2 Nov 2016 01:47:03 +0300
Subject: [PATCH] esp8266/etshal.h: Adjust size of MD5_CTX structure.

Size 64 was incorrect and will lead to stack corruption. Size 88 was
verified empirically. Also, allow to skip defining it if MD5_CTX
preprocessor macro is already defined (to avoid header conflict).
---
 esp8266/etshal.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/esp8266/etshal.h b/esp8266/etshal.h
index 28f977791..90af63ba2 100644
--- a/esp8266/etshal.h
+++ b/esp8266/etshal.h
@@ -24,7 +24,9 @@ extern void ets_wdt_disable(void);
 extern void wdt_feed(void);
 
 // Opaque structure
-typedef char MD5_CTX[64];
+#ifndef MD5_CTX
+typedef char MD5_CTX[88];
+#endif
 
 void MD5Init(MD5_CTX *context);
 void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
-- 
GitLab