Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

updates from upstream #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes stream load memory leak in WifiSecureClient for SSL CACert, Cer…
…tificate, and (espressif#6387)

Private Key. Issue presented during any subsequent invocation of loadCACert, loadCertificate, and
loadPrivateKey, respectively, after the first invocation.
  • Loading branch information
beeboopx authored Apr 26, 2022
commit d7ffd573d0ccecc6fe59100189023158ee17b02d
3 changes: 3 additions & 0 deletions 3 libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ char *WiFiClientSecure::_streamLoad(Stream& stream, size_t size) {
}

bool WiFiClientSecure::loadCACert(Stream& stream, size_t size) {
if (_CA_cert != NULL) free(const_cast<char*>(_CA_cert));
char *dest = _streamLoad(stream, size);
bool ret = false;
if (dest) {
Expand All @@ -325,6 +326,7 @@ bool WiFiClientSecure::loadCACert(Stream& stream, size_t size) {
}

bool WiFiClientSecure::loadCertificate(Stream& stream, size_t size) {
if (_cert != NULL) free(const_cast<char*>(_cert));
char *dest = _streamLoad(stream, size);
bool ret = false;
if (dest) {
Expand All @@ -335,6 +337,7 @@ bool WiFiClientSecure::loadCertificate(Stream& stream, size_t size) {
}

bool WiFiClientSecure::loadPrivateKey(Stream& stream, size_t size) {
if (_private_key != NULL) free(const_cast<char*>(_private_key));
char *dest = _streamLoad(stream, size);
bool ret = false;
if (dest) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.