Date: Thu, 12 Nov 2009 03:07:05 GMT From: Jeremy Huddleston <jeremyhu@apple.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/140496: Maintainance update for sprintf.c Message-ID: <200911120307.nAC375Fc001886@www.freebsd.org> Resent-Message-ID: <200911120310.nAC3A4Gi065687@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 140496
>Category: misc
>Synopsis: Maintainance update for sprintf.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 12 03:10:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Huddleston
>Release: 8.0
>Organization:
Apple
>Environment:
NA
>Description:
Make sprintf use vsprintf like similar changes to other stdio functions.
>How-To-Repeat:
>Fix:
--- sprintf.c.bsdnew 2009-11-11 19:03:58.000000000 -0800
+++ sprintf.c 2009-11-11 19:04:47.000000000 -0800
@@ -46,17 +46,9 @@ sprintf(char * __restrict str, char cons
{
int ret;
va_list ap;
- FILE f;
- f._file = -1;
- f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = INT_MAX;
- f._orientation = 0;
- memset(&f._mbstate, 0, sizeof(mbstate_t));
va_start(ap, fmt);
- ret = __vfprintf(&f, fmt, ap);
+ ret = vsprintf(str, fmt, ap);
va_end(ap);
- *f._p = 0;
return (ret);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911120307.nAC375Fc001886>
