Do not limit properties to 256 characters when evaluating them.
authorAric Stewart <aric@codeweavers.com>
Wed, 9 Feb 2005 13:26:16 +0000 (13:26 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 9 Feb 2005 13:26:16 +0000 (13:26 +0000)
dlls/msi/cond.y

index 255a23f555d1c911b9319967606a11918205fb14..f6c731474de5c2948b557db474ee288e1dc0cd91 100644 (file)
@@ -448,14 +448,22 @@ symbol_s:
         {
             DWORD sz;
             COND_input* cond = (COND_input*) info;
-            $$ = HeapAlloc( GetProcessHeap(), 0, 0x100*sizeof (WCHAR) );
 
-            /* Lookup the identifier */
-
-            sz=0x100;
-            if (MSI_GetPropertyW(cond->package,$1,$$,&sz) != ERROR_SUCCESS)
+            sz = 0;
+            MSI_GetPropertyW(cond->package, $1, NULL, &sz);
+            if (sz == 0)
+            {
+                $$ = HeapAlloc( GetProcessHeap(), 0 ,sizeof(WCHAR));
+                $$[0] = 0;
+            }
+            else
             {
-                $$[0]=0;
+                sz ++;
+                $$ = HeapAlloc( GetProcessHeap(), 0, sz*sizeof (WCHAR) );
+
+                /* Lookup the identifier */
+
+                MSI_GetPropertyW(cond->package,$1,$$,&sz);
             }
             HeapFree( GetProcessHeap(), 0, $1 );
         }