Reviewers: Kevin Millikin,

Description:
Harden message handling in the debugger agent.

This defect have been reported by the Coverity Prevent static analysis
tool.

Please review this at http://codereview.chromium.org/160327

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/debug-agent.cc


Index: src/debug-agent.cc
===================================================================
--- src/debug-agent.cc  (revision 2578)
+++ src/debug-agent.cc  (working copy)
@@ -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