Nicolas Le Cam : msi: Fix buffer length value returned by MSI_RecordGetStringW on null and empty strings .

Alexandre Julliard julliard at winehq.org
Mon Apr 20 11:33:12 CDT 2009


Module: wine
Branch: master
Commit: e00d864a35ff9739fc55d73d869f69c0067d0bce
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e00d864a35ff9739fc55d73d869f69c0067d0bce

Author: Nicolas Le Cam <niko.lecam at gmail.com>
Date:   Thu Apr 16 01:09:09 2009 +0200

msi: Fix buffer length value returned by MSI_RecordGetStringW on null and empty strings.

---

 dlls/msi/record.c       |    1 -
 dlls/msi/tests/record.c |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index d484cb8..db54cdc 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -444,7 +444,6 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField,
             lstrcpynW(szValue, rec->fields[iField].u.szwVal, *pcchValue);
         break;
     case MSIFIELD_NULL:
-        len = 1;
         if( szValue && *pcchValue > 0 )
             szValue[0] = 0;
     default:
diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c
index ca70494..e8dd6f5 100644
--- a/dlls/msi/tests/record.c
+++ b/dlls/msi/tests/record.c
@@ -140,7 +140,6 @@ static void test_msirecord(void)
     r = MsiRecordGetStringW(h, 0, bufW, &sz);
     ok(r == ERROR_SUCCESS, "Failed to get string at 0\n");
     ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n");
-    todo_wine
     ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n");
     r = MsiRecordSetString(h, 0, "");
     ok(r == ERROR_SUCCESS, "Failed to set empty string at 0\n");
@@ -159,7 +158,6 @@ static void test_msirecord(void)
     r = MsiRecordGetStringW(h, 0, bufW, &sz);
     ok(r == ERROR_SUCCESS, "Failed to get string at 0\n");
     ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n");
-    todo_wine
     ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n");
 
     /* same record, but add a string to it */




More information about the wine-cvs mailing list