[Win] Fix potential buffer overrun in DLLLauncher
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jun 2014 23:59:10 +0000 (23:59 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jun 2014 23:59:10 +0000 (23:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134351
<rdar://problem/17469185>

Reviewed by Darin Adler.

* win/DLLLauncher/DLLLauncherMain.cpp: Correct error
in end-of-buffer calculation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/win/DLLLauncher/DLLLauncherMain.cpp

index 2136d01..6a3162c 100644 (file)
@@ -1,3 +1,14 @@
+2014-06-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Fix potential buffer overrun in DLLLauncher
+        https://bugs.webkit.org/show_bug.cgi?id=134351
+        <rdar://problem/17469185>
+
+        Reviewed by Darin Adler.
+
+        * win/DLLLauncher/DLLLauncherMain.cpp: Correct error
+        in end-of-buffer calculation.
+
 2014-06-26  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
 
         [EFL] Missing dependency between freetype6 and fontconfig libs.
index e23bd02..72fa62e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -176,7 +176,7 @@ static wstring getLastErrorString(HRESULT hr)
     if (len >= bufSize)
         len = bufSize - 1;
 
-    errorMessage[len + 1] = 0;
+    errorMessage[len] = 0;
 
     return errorMessage;
 }