OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Blesson Paul (blessonpaulSOFTHOME.NET)
Date: Wed May 22 2002 - 09:02:08 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    In the msdn site Michael Howard has written a article which explains secure
    coding etc.. . In the last, he just written a code which he says there is a
    bug in it. Can anyone find out what is the bug is

    This is the code

    WCHAR g_wszComputerName[INTERNET_MAX_HOST_NAME_LENGTH + 1];

    // Get the server name and convert it to the Unicode string.
    BOOL GetServerName (EXTENSION_CONTROL_BLOCK *pECB) {
        DWORD dwSize = sizeof(g_wszComputerName);
        char szComputerName[INTERNET_MAX_HOST_NAME_LENGTH + 1];

        if (pECB->GetServerVariable (pECB->ConnID,
                 "SERVER_NAME",
                 szComputerName,
                 &dwSize)) {
        // rest of code snipped

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM