nsReadLine.h not friendly with DOS-style text file

VERIFIED INVALID

Status

()

Core
Networking: File
VERIFIED INVALID
15 years ago
10 years ago

People

(Reporter: Daniel Wang, Assigned: Darin Fisher)

Tracking

({dataloss})

Trunk
x86
Windows 98
dataloss
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
it appears NS_ReadLine() will always skip any line with \r\n or \n\r

This function is used by mozilla/netwerk/cookie/src/nsCookieService.cpp
nsCookieService::Read() and the bug causes it to import cookie file exported by
MSIE incorrectly.
(Reporter)

Comment 1

15 years ago
Created attachment 133313 [details] [diff] [review]
patch
(Reporter)

Updated

15 years ago
Attachment #133313 - Flags: review?(timeless)
Um... The code was designed to handle \r\n line endings and was tested on such
(as well as \n\r, \r, and \n) before it was checked into the tree.  When we hit
the \r we set eolStarted; when we hit the following \n we return from the
function (since we reached end of line).  That's correct.

Your change would make us not return at the end of the line, which would be wrong...

So why does this change make things better, exactly?
(Reporter)

Comment 3

15 years ago
sorry, you are right. The code does work. -> invalid
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
(Reporter)

Updated

15 years ago
Attachment #133313 - Flags: review?(timeless)

Comment 4

10 years ago
v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.