mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Use workaround function for sprintf, if the return value of sprintf is needed
This commit is contained in:
parent
497b3fe2c5
commit
63d4411560
@ -100,7 +100,7 @@ static char *_ps_files_path_create(char *buf, size_t buflen, ps_files *data, con
|
||||
(strlen(data->basedir) + 2 * data->dirdepth + keylen + 5 + sizeof(FILE_PREFIX)))
|
||||
return NULL;
|
||||
p = key;
|
||||
n = sprintf(buf, "%s/", data->basedir);
|
||||
n = zend_sprintf(buf, "%s/", data->basedir);
|
||||
for(i = 0; i < data->dirdepth; i++) {
|
||||
buf[n++] = *p++;
|
||||
buf[n++] = DIR_DELIMITER;
|
||||
|
@ -1607,7 +1607,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_
|
||||
case '\v': *target++ = 'v'; break;
|
||||
case '\b': *target++ = 'b'; break;
|
||||
case '\f': *target++ = 'f'; break;
|
||||
default: target += sprintf(target, "%03o", (unsigned char)c);
|
||||
default: target += zend_sprintf(target, "%03o", (unsigned char)c);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user