- From: Calum (bulk) <calum.bulk@ntlworld.com>
- Date: Wed, 21 May 2003 10:42:47 +0100
- To: www-lib@w3.org
- CC: "Calum (bulk)" <calum.bulk@ntlworld.com>
I've sussed this one out. Basically in Linux, atoi(NULL) returns 0, while in Windows, atoi(NULL) gives an access violation. I've hacked a solution which stops it crashing, and returns 0 (the old behaviour). It seems to be the result of a badly formed header. Though, I don't know what the correct response code should be in this situation. So this should go on someones todo list. HTTP.c: 730, 747 Calum Calum (bulk) wrote: > > I hope this is the right place to post a bug report? > > I'm running the latest cvs www-lib on Windows, (built using world.dsw > on MSVC 6.0). I occasionally get a crash that basically occurs in > HTTP.c:747 > > me->status = atoi(HTNextField(&ptr)); > > since HTNextField seems to return NULL occasionally. I don't get this > crash on Linux. > > Calum > > Windows stack dump: > > atol(const char * 0x00000000) line 42 + 37 bytes > atoi(const char * 0x00000000) line 87 + 9 bytes > stream_pipe(_HTStream * 0x01cea918, int 17) line 747 + 19 bytes > HTTPStatus_put_block(_HTStream * 0x01cea918, const char * 0x01cc3ad0, > int 118) line 904 + 16 bytes > HTReader_read(_HTInputStream * 0x01cc3aa8) line 222 + 32 bytes > HTHost_read(_HTHost * 0x01c49e40, _HTNet * 0x01c492f8) line 1647 + 18 > bytes > HTTPEvent(unsigned int 1600, void * 0x01c49688, int 1) line 1310 + 13 > bytes > HostEvent(unsigned int 1600, void * 0x01c49e40, int 1) line 202 + 33 > bytes > HTEventList_dispatch(unsigned int 1600, int 1, unsigned long 966099) > line 581 + 21 bytes > AsyncWindowProc(HWND__ * 0x0001031c, unsigned int 1024, unsigned int > 1600, long 1) line 838 + 17 bytes > USER32! 77d67ad7() > USER32! 77d6ccd4() > USER32! 77d44455() > USER32! 77d44d58() > HTEventList_newLoop() line 606 + 7 bytes > W3CFetcher::eventLoop() line 907 > main(int 1, char * * 0x011a2cd0) line 285 > mainCRTStartup() line 206 + 25 bytes > KERNEL32! 77e814c7() > >
Received on Wednesday, 21 May 2003 05:42:45 UTC