summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_wrapper.c
diff options
context:
space:
mode:
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;
}