VirtualBox

Ignore:
Timestamp:
Jul 5, 2013 3:34:09 PM (11 years ago)
Author:
vboxsync
Message:

IPRT/RTSystemQueryOSInfo-win.cpp: Must be sizeof(OSVERSIONINFOEX).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp

    r47010 r47011  
    309309     */
    310310    OSVERSIONINFOEX OSInfoEx;
    311     memset(&OSInfoEx, '\0', sizeof(OSInfoEx));
    312     OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
     311    RT_ZERO(OSInfoEx);
     312    OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
    313313    if (!GetVersionEx((LPOSVERSIONINFO) &OSInfoEx))
    314314    {
     
    319319
    320320    /* Get extended version info for 2000 and later. */
    321     if (    OSInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT
    322         &&  OSInfoEx.dwMajorVersion >= 5)
    323     {
    324         ZeroMemory(&OSInfoEx, sizeof(OSInfoEx));
     321    if (   OSInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT
     322        && OSInfoEx.dwMajorVersion >= 5)
     323    {
     324        RT_ZERO(OSInfoEx);
    325325        OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
    326326        if (!GetVersionEx((LPOSVERSIONINFO) &OSInfoEx))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette