Re: Windows absolute drive path detection incomplete

2019-08-08 Thread brian m. carlson
On 2019-08-08 at 16:44:52, Christopher Ertl wrote: > So I'm proposing to remove the check for the drive letter being alpha in > `has_dos_drive_prefix` macro: > > #define has_dos_drive_prefix(path) \ > ( (path)[1] == ':' ? 2 : 0) Is the drive character required to be ASCII? If it can be non

RE: Windows absolute drive path detection incomplete

2019-08-08 Thread Christopher Ertl
ding. RG6 1WG -Original Message- From: Eric Sunshine Sent: Thursday, August 8, 2019 5:51 PM To: Christopher Ertl Cc: git@vger.kernel.org Subject: Re: Windows absolute drive path detection incomplete On Thu, Aug 8, 2019 at 12:45 PM Christopher Ertl wrote: > So I'm proposing to

Re: Windows absolute drive path detection incomplete

2019-08-08 Thread Eric Sunshine
On Thu, Aug 8, 2019 at 12:45 PM Christopher Ertl wrote: > So I'm proposing to remove the check for the drive letter being alpha in > `has_dos_drive_prefix` macro: > > #define has_dos_drive_prefix(path) \ > ( (path)[1] == ':' ? 2 : 0) Nit: This isn't safe and will access memory beyond end

Windows absolute drive path detection incomplete

2019-08-08 Thread Christopher Ertl
Hi, I'd like to report a problem with path validation for Windows, and propose a fix. Function `verify_path` first calls `has_dos_drive_prefix` in order to prevent absolute drive paths like "C:\xxx". The logic for that is implemented as follows: #define has_dos_drive_prefix(path) \ (i