You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getShortPathName returns invalid response in Cygwin #3649
The path that the lpszLongPath parameter specifies does not have to be a full or long path. The short form can be longer than the specified path.
So I guess the problem is that the sample path above shortens to something longer, violating the assumption our code makes (which allocates a buffer based on the length of the input path + 1).
Activity
ezyang commentedon Aug 1, 2016
CC @23Skidoo who wrote this code.
Since cygpath computes short path correctly, we can look at its source code to see how to do it properly http://cygwin-ports.sourceforge.net/scan-build/utils/report-MWMmDX.html
From GetShortPath docs:
So I guess the problem is that the sample path above shortens to something longer, violating the assumption our code makes (which allocates a buffer based on the length of the input path + 1).
NovaDenizen commentedon Aug 1, 2016
Found the way to fix it from here
NovaDenizen commentedon Aug 1, 2016
#3487 seems related too.
ezyang commentedon Aug 1, 2016
Thanks, I think it is indeed this bug!
ezyang commentedon Aug 1, 2016
I would close this but if we do a point release for 1.24.0.1 we should put this patch in.
23Skidoo commentedon Aug 1, 2016
Already cherry-picked into 1.24, so closing.