mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
Fix array overrun when appending slash to paths
Fix it by extending the array sizes by one character. As the input is limited to the maximum path length, there will always be place to append the slash. As the php_check_specific_open_basedir() simply uses the strings to compare against each other, no new failures related to too long paths are introduced. We'll let the DOM and XML case handle a potentially too long path in the library code.
This commit is contained in:
parent
8ef9294248
commit
c0fceebfa1
3 changed files with 5 additions and 5 deletions
|
@ -1017,7 +1017,7 @@ PHP_METHOD(XMLReader, XML)
|
|||
xmlreader_object *intern = NULL;
|
||||
char *source, *uri = NULL, *encoding = NULL;
|
||||
int resolved_path_len, ret = 0;
|
||||
char *directory=NULL, resolved_path[MAXPATHLEN];
|
||||
char *directory=NULL, resolved_path[MAXPATHLEN + 1];
|
||||
xmlParserInputBufferPtr inputbfr;
|
||||
xmlTextReaderPtr reader;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue