Bug 14516 - crash loading multipart/x-mixed-replace data on windows safari
Summary: crash loading multipart/x-mixed-replace data on windows safari
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P1 Normal
Assignee: Nobody
Depends on:
Reported: 2007-07-03 15:20 PDT by Tony Chang
Modified: 2007-07-06 03:05 PDT (History)
1 user (show)

See Also:

Crash on safari windows (183 bytes, text/plain)
2007-07-03 15:21 PDT, Tony Chang
no flags Details
null check m_resourceData (1017 bytes, patch)
2007-07-03 16:39 PDT, Tony Chang
mjs: review-
Details | Formatted Diff | Diff
null check m_resourceData and layout test (3.75 KB, patch)
2007-07-05 18:39 PDT, Tony Chang
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!