This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, flox, georg.brandl, loewis, mark.dickinson, pepalogik, vstinner
Date 2013-02-06.13:19:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwb2_ghgOERa_2rj7KtRZWcKUTNPCmodd=u1y8dd66VGFg@mail.gmail.com>
In-reply-to <1360153485.13.0.651793958142.issue17137@psf.upfronthosting.co.za>
Content
I'm interested by your struct.name string: can you also dump it? Where
does it come from? Does it use ctypes?

 * print(ascii(struct.name))
 * print(ascii(struct.name.encode("unicode_internal")))
 * print(ascii(struct.name.encode("utf-8")))

I'm interested by all variables used to build the final path.

nt._isdir() doesn't check if the path contains a NUL character. It
should: see aksi #13617

> b'D\x00:\x00\\\x00B\x00u\x00g\x00 \x00r\x00e\x00p\x00o\x00r\x00t\x00s\x00\\\x00P\x00y\x00t\x00h\x00o\x00n\x00\\\x00A\x00u\x00t\x00o\x00L\x00E\x00E\x00D\x00\\\x00d\x00e\x00f\x00a\x00u\x00l\x00t\x00\\\x00s\x00u\x00b\x00-\x00f\x00c\x00c\x00\x00\x002\x00\x03\x00\x00\x00\x00\x00'

Decoded from UTF-16-LE, it gives:
'D:\\Bug reports\\Python\\AutoLEED\\default\\sub-fcc\x002\x03\x00\x00'

> b'D:\\Bug reports\\Python\\AutoLEED\\default\\sub-fcc\\bulk'

Decode from UTF-8, it gives:
'D:\\Bug reports\\Python\\AutoLEED\\default\\sub-fcc\\bulk'

It looks like the wstr representation of the string is corrupted.
History
Date User Action Args
2013-02-06 13:19:36vstinnersetrecipients: + vstinner, loewis, georg.brandl, mark.dickinson, ezio.melotti, flox, pepalogik
2013-02-06 13:19:36vstinnerlinkissue17137 messages
2013-02-06 13:19:36vstinnercreate