summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_wrapper.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2007-02-24 02:17:47 +0000
committerMarcus Boerger <helly@php.net>2007-02-24 02:17:47 +0000
commit50ea26760da4e0fcf4980e739e1d0ed520de8d59 (patch)
tree888a32ce58864f5318a7f1072f8526c6a99212f9 /ext/com_dotnet/com_wrapper.c
parent3e262bd36989898ac01224f0a987e79f44d25b31 (diff)
downloadphp-git-50ea26760da4e0fcf4980e739e1d0ed520de8d59.tar.gz
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
Diffstat (limited to 'ext/com_dotnet/com_wrapper.c')
-rw-r--r--ext/com_dotnet/com_wrapper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c
index 4cc81aa04b..b698affa22 100644
--- a/ext/com_dotnet/com_wrapper.c
+++ b/ext/com_dotnet/com_wrapper.c
@@ -74,7 +74,7 @@ static inline void trace(char *fmt, ...)
va_list ap;
char buf[4096];
- sprintf(buf, "T=%08x ", GetCurrentThreadId());
+ snprintf(buf, sizeof(buf), "T=%08x ", GetCurrentThreadId());
OutputDebugString(buf);
va_start(ap, fmt);
@@ -474,7 +474,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
&namelen, &pid, 0, &pos))) {
char namebuf[32];
if (keytype == HASH_KEY_IS_LONG) {
- sprintf(namebuf, "%d", pid);
+ snprintf(namebuf, sizeof(namebuf), "%d", pid);
name = namebuf;
namelen = strlen(namebuf)+1;
}
@@ -506,7 +506,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
char namebuf[32];
if (keytype == HASH_KEY_IS_LONG) {
- sprintf(namebuf, "%d", pid);
+ snprintf(namebuf, sizeof(namebuf), "%d", pid);
name = namebuf;
namelen = strlen(namebuf) + 1;
}