Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Jul 2010 00:11:41 +0000 (00:11 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Jul 2010 00:11:41 +0000 (00:11 +0000)
commit262ea4a276d570a7a3a2be2a898be70eb67303f1
treec09b0d5ab21fa26124567429f99820d71661608b
parent69f759257627836fb16c0128f08a2541d6be04c1
Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.

Reviewed by Darin Adler.

- MSVC does not ensure the buffers are null terminated as the unix versions do.

* runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
* runtime/UString.cpp: Clean up includes.
(JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
* wtf/StringExtras.h:
(snprintf): Ensure null termination of buffer.
(vsnprintf): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
JavaScriptCore/runtime/UString.cpp
JavaScriptCore/wtf/StringExtras.h