comparison src/windows/native/sun/windows/awt_DesktopProperties.cpp @ 7441:cf14f699f36c

8009071: Improve shape handling Reviewed-by: art, mschoene
author anthony
date Thu, 18 Apr 2013 13:52:38 +0100
parents 1785f8335f4d
children 8b1f1c2a400f
comparison
equal deleted inserted replaced
9:6a41183e2bca 10:0f533494792c
169 RegCloseKey(handle); 169 RegCloseKey(handle);
170 170
171 if (*valueType == REG_EXPAND_SZ) { 171 if (*valueType == REG_EXPAND_SZ) {
172 // Pending: buffer must be null-terminated at this point 172 // Pending: buffer must be null-terminated at this point
173 valueChar = ExpandEnvironmentStrings(buffer, NULL, 0); 173 valueChar = ExpandEnvironmentStrings(buffer, NULL, 0);
174 LPTSTR buffer2 = (LPTSTR)safe_Malloc(valueChar*sizeof(TCHAR)); 174 LPTSTR buffer2 = (LPTSTR)SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, valueChar, sizeof(TCHAR));
175 ExpandEnvironmentStrings(buffer, buffer2, valueChar); 175 ExpandEnvironmentStrings(buffer, buffer2, valueChar);
176 free(buffer); 176 free(buffer);
177 return buffer2; 177 return buffer2;
178 } else if (*valueType == REG_SZ) { 178 } else if (*valueType == REG_SZ) {
179 return buffer; 179 return buffer;
586 } 586 }
587 free(value); 587 free(value);
588 } 588 }
589 589
590 LPTSTR valueName = TEXT("PlaceN"); 590 LPTSTR valueName = TEXT("PlaceN");
591 LPTSTR valueNameBuf = (LPTSTR)safe_Malloc((lstrlen(valueName) + 1) * sizeof(TCHAR)); 591 LPTSTR valueNameBuf = (LPTSTR)SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, (lstrlen(valueName) + 1), sizeof(TCHAR));
592 lstrcpy(valueNameBuf, valueName); 592 lstrcpy(valueNameBuf, valueName);
593 593
594 LPTSTR propKey = TEXT("win.comdlg.placesBarPlaceN"); 594 LPTSTR propKey = TEXT("win.comdlg.placesBarPlaceN");
595 LPTSTR propKeyBuf = (LPTSTR)safe_Malloc((lstrlen(propKey) + 1) * sizeof(TCHAR)); 595 LPTSTR propKeyBuf = (LPTSTR)SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, (lstrlen(propKey) + 1), sizeof(TCHAR));
596 lstrcpy(propKeyBuf, propKey); 596 lstrcpy(propKeyBuf, propKey);
597 597
598 int i = 0; 598 int i = 0;
599 do { 599 do {
600 valueNameBuf[5] = _T('0' + i++); 600 valueNameBuf[5] = _T('0' + i++);