aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/sprintf.c')
-rw-r--r--com32/lib/sprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/lib/sprintf.c b/com32/lib/sprintf.c
index 3c328410..d00274e0 100644
--- a/com32/lib/sprintf.c
+++ b/com32/lib/sprintf.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <unistd.h>
+#include <limits.h>
int sprintf(char *buffer, const char *format, ...)
{
@@ -11,7 +12,7 @@ int sprintf(char *buffer, const char *format, ...)
int rv;
va_start(ap, format);
- rv = vsnprintf(buffer, ~(size_t) 0, format, ap);
+ rv = vsnprintf(buffer, INT_MAX, format, ap);
va_end(ap);
return rv;