Message77799
GetFullPathNameW may return the required buffer size (non-zero value)
when buffer is too short. Before r67154, this case was treated as
success, so there was possibility of access to uninitialized buffer
woutbuf. Fortunately, GetFullPathNameW sets '\0' to woutbuf (this is
undocumented behavior), so abspath() returned empty string instead of
segmentation fault. But this is still potentially dangerous, so I fixed
this by allocating required size buffer and calling GetFullPathNameW
again. abspath() returns correct result for any long unicode path now.
But original poster hopes abspath() should return correct result for
any long both *str* and unicode path. For str, this issue is not solved
yet.
--
I'm skeptical abspath() should support longer path than MAX_PATH if
ANSI version of Windows API cannot handle such path. Anyway, I won't
use such long path. ;-) |
|
Date |
User |
Action |
Args |
2008-12-14 14:59:26 | ocean-city | set | recipients:
+ ocean-city, loewis, amaury.forgeotdarc, JDay |
2008-12-14 14:59:26 | ocean-city | set | messageid: <1229266766.59.0.549061501458.issue4071@psf.upfronthosting.co.za> |
2008-12-14 14:59:25 | ocean-city | link | issue4071 messages |
2008-12-14 14:59:24 | ocean-city | create | |
|