It is possible to be given a class return buffer of NULL but given a class return buffer size ptr (which is 0) so we cannot use the existence of the class return buffer size ptr existence to determine if we are to return the class in the class buffer. -aric
Index: dlls/advapi32/registry.c =================================================================== RCS file: /home/wine/wine/dlls/advapi32/registry.c,v retrieving revision 1.30 diff -u -u -r1.30 registry.c --- dlls/advapi32/registry.c 2001/12/05 22:18:48 1.30 +++ dlls/advapi32/registry.c 2002/01/31 14:38:07 @@ -348,18 +348,18 @@ DWORD len, cls_len; RtlUnicodeToMultiByteSize( &len, info->Name, info->NameLength ); - RtlUnicodeToMultiByteSize( &cls_len, (WCHAR *)(buf_ptr + info->ClassOffset), - info->ClassLength ); + RtlUnicodeToMultiByteSize( &cls_len, (WCHAR *)(buf_ptr + + info->ClassOffset), info->ClassLength ); if (ft) *ft = *(FILETIME *)&info->LastWriteTime; - if (len >= *name_len || (class_len && (cls_len >= *class_len))) + if (len >= *name_len || (class && class_len && (cls_len >= *class_len))) status = STATUS_BUFFER_OVERFLOW; else { *name_len = len; RtlUnicodeToMultiByteN( name, len, NULL, info->Name, info->NameLength ); name[len] = 0; - if (class_len) + if (class && class_len) { *class_len = cls_len; if (class)