[PATCH] D28217: [libc++] Overallocation of am_pm array in locale.cpp
Daniel C. Dillon via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 08:34:21 PST 2017
dcdillon created this revision.
dcdillon added a reviewer: howard.hinnant.
dcdillon added a subscriber: cfe-commits.
Herald added a reviewer: EricWF.
Changed array size from 24 to 2 in init_am_pm() and init_wam_pm()
https://reviews.llvm.org/D28217
Files:
src/locale.cpp
Index: src/locale.cpp
===================================================================
--- src/locale.cpp
+++ src/locale.cpp
@@ -4640,7 +4640,7 @@
string*
init_am_pm()
{
- static string am_pm[24];
+ static string am_pm[2];
am_pm[0] = "AM";
am_pm[1] = "PM";
return am_pm;
@@ -4650,7 +4650,7 @@
wstring*
init_wam_pm()
{
- static wstring am_pm[24];
+ static wstring am_pm[2];
am_pm[0] = L"AM";
am_pm[1] = L"PM";
return am_pm;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28217.82806.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170102/43a45f3d/attachment.bin>
More information about the cfe-commits
mailing list