Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,9 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
int isFileUri = 0;

uri = xmlCreateURI();
if (uri == NULL) {
return NULL;
}
escsource = xmlURIEscapeStr((xmlChar *) source, (xmlChar *) ":");
xmlParseURIReference(uri, (char *) escsource);
xmlFree(escsource);
Expand Down
6 changes: 6 additions & 0 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -7345,6 +7345,12 @@ PHP_FUNCTION(openssl_digest)
sigbuf = zend_string_alloc(siglen, 0);

md_ctx = EVP_MD_CTX_create();

// add check against NULL
if (md_ctx == NULL) {
RETURN_FALSE;
}

if (EVP_DigestInit(md_ctx, mdtype) &&
EVP_DigestUpdate(md_ctx, (unsigned char *)data, data_len) &&
EVP_DigestFinal (md_ctx, (unsigned char *)ZSTR_VAL(sigbuf), &siglen)) {
Expand Down
3 changes: 3 additions & 0 deletions ext/xmlreader/php_xmlreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int reso
int isFileUri = 0;

uri = xmlCreateURI();
if (uri == NULL) {
return NULL;
}
escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *)":");
xmlParseURIReference(uri, (const char *)escsource);
xmlFree(escsource);
Expand Down
3 changes: 3 additions & 0 deletions ext/xmlwriter/php_xmlwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i
int isFileUri = 0;

uri = xmlCreateURI();
if (uri == NULL) {
return NULL;
}
escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *) ":");
xmlParseURIReference(uri, (char *)escsource);
xmlFree(escsource);
Expand Down