Revision: 2580
Author: [email protected]
Date: Thu Jul 30 00:02:23 2009
Log: Harden message handling in the debugger agent.

This defect have been reported by the Coverity Prevent static analysis tool.
Review URL: http://codereview.chromium.org/160327
http://code.google.com/p/v8/source/detail?r=2580

Modified:
  /branches/bleeding_edge/src/debug-agent.cc

=======================================
--- /branches/bleeding_edge/src/debug-agent.cc  Mon May 25 03:05:56 2009
+++ /branches/bleeding_edge/src/debug-agent.cc  Thu Jul 30 00:02:23 2009
@@ -254,8 +254,8 @@

      // Check that key is Content-Length.
      if (strcmp(key, kContentLength) == 0) {
-      // Get the content length value if within a sensible range.
-      if (strlen(value) > 7) {
+      // Get the content length value if present and within a sensible  
range.
+      if (value == NULL || strlen(value) > 7) {
          return SmartPointer<char>();
        }
        for (int i = 0; value[i] != '\0'; i++) {

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to