The return values of PR_Seek64 and PR_Available64 should be checked in FileImpl::Seek or else file corruption will occur

RESOLVED FIXED

Status

()

Core
XPCOM
--
critical
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: hiro, Assigned: hiro)

Tracking

({dataloss, fixed1.8.1.18})

1.8 Branch
dataloss, fixed1.8.1.18
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.15) Gecko/20080702 Ubuntu/8.04 (hardy) Firefox/2.0.0.15 Kazehakase/0.5.4
Build Identifier: 

The return values of PR_Seek64 and PR_Available64 should be checked in  FileImpl::Seek or else file corruption will occur.

When call Seek(NS_SEEK_END, 0), if PR_Available64 fails then fileSize become wrong value. So file pointer does not move to end of file.




Reproducible: Always

Steps to Reproduce:
1.
2.
3.
(Assignee)

Updated

9 years ago
Keywords: dataloss
Version: unspecified → 1.8 Branch
(Assignee)

Comment 1

9 years ago
Created attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]
Attachment #334836 - Flags: superreview?(neil)
Attachment #334836 - Flags: review?(neil)
(Assignee)

Comment 2

9 years ago
I suspect BUG 432514 was caused by this issue.

Comment 3

9 years ago
Comment on attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]

You need an XPCOM reviewer for this.
Attachment #334836 - Flags: review?(neil) → review?(benjamin)
Comment on attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]

r=me, although this code really just needs to die
Attachment #334836 - Flags: review?(benjamin) → review+

Updated

9 years ago
Attachment #334836 - Flags: superreview?(neil) → superreview+
(Assignee)

Comment 5

9 years ago
I agree. But Thunderbird 2.0.0.x still uses this code. I don't think that cleanup XPCOM/obsolete codes from Thunderbird is good for its stability.
(Assignee)

Comment 6

9 years ago
Comment on attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]

the patch will raise stability.
Attachment #334836 - Flags: approval1.8.1.17?
Comment on attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]

This will have to get looked at in 1.8.1.18. We're frozen.
Attachment #334836 - Flags: approval1.8.1.17? → approval1.8.1.18?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: checkin-needed
Comment on attachment 334836 [details] [diff] [review]
Check both values
[Checkin: Comment 9]

Approved for 1.8.1.18, a=dveditz for release-drivers
Attachment #334836 - Flags: approval1.8.1.18? → approval1.8.1.18+

Updated

9 years ago
Assignee: nobody → poincare
http://hg.mozilla.org/mozilla-central/rev/6601dacc93f7
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
(Assignee)

Updated

9 years ago
Whiteboard: [checkin-needed: 1.8 branch]
Target Milestone: mozilla1.9.1b1 → ---
Attachment #334836 - Attachment description: Check both values. → Check both values [Checkin: Comment 9]
Patch checked into the 1.8 branch
Keywords: checkin-needed → fixed1.8.1.18
Whiteboard: [checkin-needed: 1.8 branch]
You need to log in before you can comment on or make changes to this bug.