diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-04-05 15:57:50 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-04-05 15:57:50 -0400 |
commit | 064e50fb06e83e6c1756e2a81c2fcbd4d6fca8e6 (patch) | |
tree | 45145c8db9a634af861cb1ed87a7378837e72763 /cups/snprintf.c | |
parent | 6918883fba4942931dc455b32545d6edf18dec5c (diff) | |
download | cups-064e50fb06e83e6c1756e2a81c2fcbd4d6fca8e6.tar.gz |
Import all of the bug fixes from the OpenPrinting CUPS repository.
Import the improvements to ippeveprinter from OpenPrinting/ippsample.
Import the improvements to ippfind and ipptool from OpenPrinting/ippsample.
Diffstat (limited to 'cups/snprintf.c')
-rw-r--r-- | cups/snprintf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cups/snprintf.c b/cups/snprintf.c index 49652e2c4..3c4685718 100644 --- a/cups/snprintf.c +++ b/cups/snprintf.c @@ -81,7 +81,8 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */ format ++; width = va_arg(ap, int); - snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", width); + /* Note: Can't use snprintf here since we are implementing this function... */ + sprintf(tptr, "%d", width); tptr += strlen(tptr); } else @@ -113,7 +114,8 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */ format ++; prec = va_arg(ap, int); - snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", prec); + /* Note: Can't use snprintf here since we are implementing this function... */ + sprintf(tptr, "%d", prec); tptr += strlen(tptr); } else @@ -171,6 +173,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */ if ((width + 2) > sizeof(temp)) break; + /* Note: Can't use snprintf here since we are implementing this function... */ sprintf(temp, tformat, va_arg(ap, double)); templen = strlen(temp); @@ -202,6 +205,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */ if ((width + 2) > sizeof(temp)) break; + /* Note: Can't use snprintf here since we are implementing this function... */ sprintf(temp, tformat, va_arg(ap, int)); templen = strlen(temp); @@ -226,6 +230,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */ if ((width + 2) > sizeof(temp)) break; + /* Note: Can't use snprintf here since we are implementing this function... */ sprintf(temp, tformat, va_arg(ap, void *)); templen = strlen(temp); |