Bug 165740

Summary: Use standard vsnprintf instead of non-standard vasprintf
Product: WebKit Reporter: Darin Adler <darin>
Component: WebCore Misc.Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, krollin
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch sam: review+

Darin Adler
Reported 2016-12-10 18:12:52 PST
Use std::vsnprintf instead of vasprintf
Attachments
Patch (6.24 KB, patch)
2016-12-10 18:15 PST, Darin Adler
no flags
Patch (8.63 KB, patch)
2016-12-11 06:30 PST, Darin Adler
sam: review+
Darin Adler
Comment 1 2016-12-10 18:15:12 PST
Darin Adler
Comment 2 2016-12-11 06:30:48 PST
Keith Rollin
Comment 3 2016-12-11 14:07:00 PST
Just a thought: instead of repeating the same six lines in several places, wrap them up in a utility function in StdLibExtras or something? template<typename T, int capacity) Vector<T, capacity > vecprintf(format, ...);
Darin Adler
Comment 4 2016-12-11 15:45:37 PST
Yes I think it is a good idea that I might pursue later. Returning a vector with inline capacity is inefficient though. So I would want to avoid that. Maybe pass in a function that gets the string passed into it.
Darin Adler
Comment 5 2016-12-11 16:57:36 PST
Note You need to log in before you can comment on or make changes to this bug.