Microsoft KB Archive/189127

= BUG: inet_addr with NULL Address Causes CE Device to Crash =

Article ID: 189127

Article Last Modified on 10/11/2002

-

APPLIES TO


 * Microsoft Windows CE 2.0 for the Handheld PC

-



This article was previously published under Q189127



SYMPTOMS
If you pass NULL into inet_addr, it might crash on some Windows CE devices. It does not crash in emulation on the desktop.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
#include   #include 

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR                     lpCmdLine, int nCmdShow) {      if(inet_addr("1.2.3.4") != INADDR_NONE) MessageBox(NULL,_T("\"1.2.3.4\" okay"),NULL,MB_OK); else MessageBox(NULL,_T("\"1.2.3.4\" failed"),NULL,MB_OK);

if(inet_addr("") != INADDR_NONE) MessageBox(NULL,_T("\"\" okay"),NULL,MB_OK); else MessageBox(NULL,_T("\"\" failed"),NULL,MB_OK);

// crashes on device if(inet_addr(NULL) != INADDR_NONE) MessageBox(NULL,_T("NULL okay"),NULL,MB_OK); else MessageBox(NULL,_T("NULL failed"),NULL,MB_OK);

return 0; }

Keywords: kbbug kbpending KB189127

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.