Opened 3 years ago

Last modified 2 years ago

#21508 new defect

POSIX and Windows may interpret directory document whitespace differently

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: parsing, Windows, tor-client consistency
Cc: Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor:

Description

on Windows, _atoi64 defines whitespace as:

A whitespace consists of space or tab characters

https://msdn.microsoft.com/en-us/library/czcad93k.aspx

But on POSIX-derived platforms, stroul* define whitespace as isspace(), which is:

\t \n \v \f \r " "

This affects at least tor_parse_uint64, and perhaps other functions.

It could mean that some numbers are interpreted differently by Windows and POSIX platforms, but since dir-spec.txt defines whitespace as space or tab, this is unlikely.

Child Tickets

Change History (2)

comment:1 Changed 3 years ago by teor

Keywords: Windows added

comment:2 Changed 2 years ago by nickm

Keywords: tor-client consistency added
Note: See TracTickets for help on using tickets.