From 19a973a85ef5a2eaf1ca59d09ec2d6e972c0cd24 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 4 Jun 2015 13:07:43 -0700 Subject: Fixes from Google-internal. --- upb/pb/textprinter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/pb') diff --git a/upb/pb/textprinter.c b/upb/pb/textprinter.c index b772af3..269881b 100644 --- a/upb/pb/textprinter.c +++ b/upb/pb/textprinter.c @@ -112,7 +112,7 @@ bool putf(upb_textprinter *p, const char *fmt, ...) { /* Run once to get the length of the string. */ va_copy(args_copy, args); - len = vsprintf(NULL, fmt, args_copy); + len = _upb_vsnprintf(NULL, 0, fmt, args_copy); va_end(args_copy); /* + 1 for NULL terminator (vsprintf() requires it even if we don't). */ -- cgit v1.2.3