Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Issue 2846037: Fix a renderer crash while processing FTP directory listing. (Closed)

Created:
10 years, 6 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
Reviewers:
eroman, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix a renderer crash while processing FTP directory listing. The problem was caused by a broken assumption about current_parser_. After adding OnEndOfInput to FtpDirectoryListingParser interface, it was possible that during processing of input we ended up with just one parser, which returned error when OnEndOfInput was called. In that case, we should just reset current_parser_ to NULL to avoid a use-after-free error. TEST=net_unittests BUG=47528 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50930

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
A net/data/ftp/dir-listing-ls-17 View 1 chunk +1 line, -0 lines 4 comments Download
A net/data/ftp/dir-listing-ls-17.expected View 0 chunks +-1 lines, --1 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer.cc View 1 chunk +1 line, -1 line 5 comments Download
M net/ftp/ftp_directory_listing_buffer_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Paweł Hajdan Jr.
10 years, 6 months ago (2010-06-25 20:19:43 UTC) #1
eroman
lgtm
10 years, 6 months ago (2010-06-25 21:00:45 UTC) #2
wtc
LGTM. http://codereview.chromium.org/2846037/diff/1/2 File net/data/ftp/dir-listing-ls-17 (right): http://codereview.chromium.org/2846037/diff/1/2#newcode1 net/data/ftp/dir-listing-ls-17:1: ftpd-BSD: .: Permission denied Just curious: could you ...
10 years, 6 months ago (2010-06-26 17:44:37 UTC) #3
Paweł Hajdan Jr.
http://codereview.chromium.org/2846037/diff/1/2 File net/data/ftp/dir-listing-ls-17 (right): http://codereview.chromium.org/2846037/diff/1/2#newcode1 net/data/ftp/dir-listing-ls-17:1: ftpd-BSD: .: Permission denied On 2010/06/26 17:44:37, wtc wrote: ...
10 years, 5 months ago (2010-06-28 16:58:48 UTC) #4
Paweł Hajdan Jr.
Oh, by the way, what do you think about merging it to the 375 branch?
10 years, 5 months ago (2010-06-28 16:59:11 UTC) #5
wtc
Merging this CL to the 375 branch (for 5.0) is fine because it fixes a ...
10 years, 5 months ago (2010-06-30 15:07:53 UTC) #6
Paweł Hajdan Jr.
10 years, 5 months ago (2010-06-30 15:19:53 UTC) #7
http://codereview.chromium.org/2846037/diff/1/2
File net/data/ftp/dir-listing-ls-17 (right):

http://codereview.chromium.org/2846037/diff/1/2#newcode1
net/data/ftp/dir-listing-ls-17:1: ftpd-BSD: .: Permission denied
On 2010/06/30 15:07:53, wtc wrote:
> Sounds like you didn't construct this test case.  Is this test case
> based on a real FTP directory listing?

Yes, that's the exact listing from the bug.

Powered by Google App Engine
This is Rietveld 408576698