Bug 14516

Summary: crash loading multipart/x-mixed-replace data on windows safari
Product: WebKit Reporter: Tony Chang <tony>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ap
Priority: P1    
Version: 523.x (Safari 3)   
Hardware: PC   
OS: Windows XP   
Description Flags
Crash on safari windows
null check m_resourceData
mjs: review-
null check m_resourceData and layout test mjs: review+

Description Tony Chang 2007-07-03 15:20:39 PDT
When loading multipart/x-mixed-replace urls, if there's no data before the first boundary data, Safari on windows crashes (tested 3.0.2 and trunk r
Comment 1 Tony Chang 2007-07-03 15:21:36 PDT
Created attachment 15377 [details]
Crash on safari windows
Comment 2 Tony Chang 2007-07-03 16:14:55 PDT
Hmm, it looks like my bug report got truncated.

It should have said:
Tested on trunk r23940.  The crash is in ResourceLoader::clearResourceData() where it tries to clear m_resourceData which hasn't been initialized.  This doesn't happen on Mac Safari because it first calls willStopBufferingData, which doesn't seem to be called at all by the windows resource handle.

The simple fix seems to be to do a null check in clearResourceData().

Comment 3 Tony Chang 2007-07-03 16:39:25 PDT
Created attachment 15379 [details]
null check m_resourceData
Comment 4 Alexey Proskuryakov 2007-07-04 02:26:08 PDT
This looks like a fix that really needs an automated test.
Comment 5 Maciej Stachowiak 2007-07-04 16:29:20 PDT
Comment on attachment 15379 [details]
null check m_resourceData

Good fix. Please add an http layout test (the tests in LayoutTests/http run on a local server, so you can generate multipart/x-mided-replace output). Also, please add an explanation of the bug being fixed to the ChangeLog entry.

r- for now, please resubmit with these things fixed.
Comment 6 Tony Chang 2007-07-05 18:39:04 PDT
Created attachment 15410 [details]
null check m_resourceData and layout test
Comment 7 Maciej Stachowiak 2007-07-05 19:26:19 PDT
Comment on attachment 15410 [details]
null check m_resourceData and layout test

Comment 8 Mark Rowe (bdash) 2007-07-06 03:05:10 PDT
Landed in r24053.  Thanks for the patch!