Bug 643649. Pass correct parameter value into registry call. r=joedrew a=dveditz
authorJohn Daggett <jdaggett@mozilla.com>
Tue, 29 Mar 2011 12:11:22 +0900
changeset 68264 087fc58e662241ed4822c0edc2a83367e74a98ed
parent 68263 244ac2eb3bafbdef005d4f3e56736678fb019fb4
child 68265 707a1efe98328aa136d1db1646c216d8ab9ea50a
push id1
push userbhearsum@mozilla.com
push dateWed, 15 Jun 2011 00:01:27 +0000
treeherdermozilla-release@a605d0df614e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew, dveditz
bugs643649
milestone2.0.1pre
Bug 643649. Pass correct parameter value into registry call. r=joedrew a=dveditz
gfx/thebes/gfxDWriteFontList.cpp
gfx/thebes/gfxGDIFontList.cpp
--- a/gfx/thebes/gfxDWriteFontList.cpp
+++ b/gfx/thebes/gfxDWriteFontList.cpp
@@ -999,17 +999,17 @@ gfxDWriteFontList::GetFontSubstitutes()
           L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes",
           0, KEY_READ, &hKey) != ERROR_SUCCESS)
     {
         return NS_ERROR_FAILURE;
     }
 
     for (i = 0, rv = ERROR_SUCCESS; rv != ERROR_NO_MORE_ITEMS; i++) {
         aliasName[0] = 0;
-        lenAlias = sizeof(aliasName);
+        lenAlias = NS_ARRAY_LENGTH(aliasName);
         actualName[0] = 0;
         lenActual = sizeof(actualName);
         rv = RegEnumValueW(hKey, i, aliasName, &lenAlias, NULL, &valueType, 
                 (LPBYTE)actualName, &lenActual);
 
         if (rv != ERROR_SUCCESS || valueType != REG_SZ || lenAlias == 0) {
             continue;
         }
--- a/gfx/thebes/gfxGDIFontList.cpp
+++ b/gfx/thebes/gfxGDIFontList.cpp
@@ -621,17 +621,17 @@ gfxGDIFontList::GetFontSubstitutes()
           L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes",
           0, KEY_READ, &hKey) != ERROR_SUCCESS)
     {
         return NS_ERROR_FAILURE;
     }
 
     for (i = 0, rv = ERROR_SUCCESS; rv != ERROR_NO_MORE_ITEMS; i++) {
         aliasName[0] = 0;
-        lenAlias = sizeof(aliasName);
+        lenAlias = NS_ARRAY_LENGTH(aliasName);
         actualName[0] = 0;
         lenActual = sizeof(actualName);
         rv = RegEnumValueW(hKey, i, aliasName, &lenAlias, NULL, &valueType, 
                 (LPBYTE)actualName, &lenActual);
 
         if (rv != ERROR_SUCCESS || valueType != REG_SZ || lenAlias == 0) {
             continue;
         }