From: Sascha Schumann Date: Sun, 19 Dec 1999 02:12:31 +0000 (+0000) Subject: Use workaround function for sprintf, if the return value of sprintf is needed X-Git-Tag: PRE_LIBZEND_TO_ZEND~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63d44115604f65e8e42f9d346197a489c200b916;p=php Use workaround function for sprintf, if the return value of sprintf is needed --- diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index e3afbfe39a..49c25a724c 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -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; diff --git a/ext/standard/string.c b/ext/standard/string.c index 1be4980757..f1203cb01a 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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; }