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).
This commit is contained in:
Paul Sokolovsky 2016-11-02 01:47:03 +03:00
parent 2ec70dc812
commit 5fae914326

View File

@ -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);