]> granicus.if.org Git - php/commitdiff
Use workaround function for sprintf, if the return value of sprintf is needed
authorSascha Schumann <sas@php.net>
Sun, 19 Dec 1999 02:12:31 +0000 (02:12 +0000)
committerSascha Schumann <sas@php.net>
Sun, 19 Dec 1999 02:12:31 +0000 (02:12 +0000)
ext/session/mod_files.c
ext/standard/string.c

index e3afbfe39acadad61e82ad6fd65eaab55568bda4..49c25a724c1bc30f29dcc7cba1c75f907a59abfe 100644 (file)
@@ -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;
index 1be4980757a58031ced6b7a08e3fbc023fc13d99..f1203cb01ab16cdc717ae1d1490d181f590a5748 100644 (file)
@@ -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;
                        }