Title: [128792] trunk/Source/WebKit2
- Revision
- 128792
- Author
- [email protected]
- Date
- 2012-09-17 12:19:04 -0700 (Mon, 17 Sep 2012)
Log Message
Crash if we fail to allocate memory for the argument encoder buffer.
https://bugs.webkit.org/show_bug.cgi?id=88367
Reviewed by Andreas Kling.
<rdar://problem/11488239>
Since there's no way to recover from malloc returning null here, just crash.
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::grow):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (128791 => 128792)
--- trunk/Source/WebKit2/ChangeLog 2012-09-17 19:08:30 UTC (rev 128791)
+++ trunk/Source/WebKit2/ChangeLog 2012-09-17 19:19:04 UTC (rev 128792)
@@ -1,3 +1,16 @@
+2012-09-17 Anders Carlsson <[email protected]>
+
+ Crash if we fail to allocate memory for the argument encoder buffer.
+ https://bugs.webkit.org/show_bug.cgi?id=88367
+
+ Reviewed by Andreas Kling.
+ <rdar://problem/11488239>
+
+ Since there's no way to recover from malloc returning null here, just crash.
+
+ * Platform/CoreIPC/ArgumentEncoder.cpp:
+ (CoreIPC::ArgumentEncoder::grow):
+
2012-09-17 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=96936
Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp (128791 => 128792)
--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp 2012-09-17 19:08:30 UTC (rev 128791)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp 2012-09-17 19:19:04 UTC (rev 128792)
@@ -80,9 +80,10 @@
m_buffer = static_cast<uint8_t*>(malloc(newCapacity));
else
m_buffer = static_cast<uint8_t*>(realloc(m_buffer, newCapacity));
-
- // FIXME: What should we do if allocating memory fails?
+ if (!m_buffer)
+ CRASH();
+
m_bufferCapacity = newCapacity;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes