Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5957 closed defect (fixed)

Our GetFileSize usage doesn't detect errors or handle 64-bit files

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When we are about to map a file on windows, we use GetFileSize to find out how big it is. But GetFileSize as we're using it doesn't return a 64-bit value, and we aren't checking for error cases. Better fix that.

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by nickm

Status: newneeds_review

Current version of my fix in branch "getfilesize_64".

A pseudonymous contributor has suggested that instead of getting 64-bit values here, we just unconditionally fail if the result is over 4GB, since we would probably never want to map a file that large anyway.

Needs review. Also needs testing.

comment:2 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-finalTor: 0.2.3.x-final

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged to 0.2.3.

comment:4 Changed 8 years ago by nickm

Keywords: tor-client added

comment:5 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.