bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

progreloc broken on cygwin 1.7


From: Eric Blake
Subject: progreloc broken on cygwin 1.7
Date: Mon, 21 Sep 2009 16:54:27 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bruno, the progreloc file is broken on cygwin 1.7, because it uses 
cygwin_conv_to_posix_path.  As of cygwin 1.7, longer filenames are supported, 
so this API is deprecated because it has no way to prevent silent buffer 
overflow.  Cygwin 1.7 adds the new API cygwin_conv_path to solve the 
shortcomings in the old API.

However, trying to use cygwin_conv_path seems backwards to me, since the point 
of Cygwin is to be a Linux emulation.  Therefore, I think that this module 
should attempt to use /proc/self/exe first, as on Linux, and only fall back to 
GetModuleFileName/cygwin_conv_to_posix_path if /proc failed (which implies that 
cygwin is so old that cygwin_conv_path does not exist but also that 
cygwin_conv_to_posix_path is safe since long file names are not possible).

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]