diff options
author | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
commit | 50ea26760da4e0fcf4980e739e1d0ed520de8d59 (patch) | |
tree | 888a32ce58864f5318a7f1072f8526c6a99212f9 /win32/registry.c | |
parent | 3e262bd36989898ac01224f0a987e79f44d25b31 (diff) | |
download | php-git-50ea26760da4e0fcf4980e739e1d0ed520de8d59.tar.gz |
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
Diffstat (limited to 'win32/registry.c')
-rw-r--r-- | win32/registry.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/win32/registry.c b/win32/registry.c index e96bf91871..752bc38128 100644 --- a/win32/registry.c +++ b/win32/registry.c @@ -217,8 +217,7 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC) while (*cwd == '\\' || *cwd == '/') { cwd++; } - path = (char *) emalloc(2+strlen(cwd)+1+strlen(orig_path)+1); - sprintf(path, "%c\\%s\\%s", drive_letter, cwd, orig_path); + spprintf(&path, 0, "%c\\%s\\%s", drive_letter, cwd, orig_path); efree(orig_path); orig_path = path; } |