1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-04 18:03:20 +03:00

Fix for MD5 leak bug, issue #7195 (#7197)

Co-authored-by: Luiss <luiss@mind.cc>
Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Develo <deveyes@gmail.com>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
This commit is contained in:
Luigi Rodorigo 2020-04-09 19:36:57 +02:00 committed by GitHub
parent 1a9988ecf1
commit 41d271d972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ bool MD5Builder::addStream(Stream & stream, const size_t maxLen){
// read data and check if we got something
int numBytesRead = stream.readBytes(buf, readBytes);
if(numBytesRead< 1) {
free(buf); // release the buffer
return false;
}