Embedded Python import fails with zip/egg files (v3.6.1)
eryk sun
eryksun at gmail.com
Thu May 11 18:37:46 EDT 2017
On Thu, May 11, 2017 at 9:02 PM, Griebel, Herbert <herbertg at gmx.at> wrote:
>
> 07:59:04,3205458 python.exe 4224 CreateFile
> C:\Users\hansi\Downloads\python-emb\python36.zip SUCCESS Desired Access:
> Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO
> Non-Alert, Open Reparse Point, Attributes: N, ShareMode: None,
> AllocationSize: n/a, OpenResult: Opened
>
> 07:59:04,3205860 python.exe 4224 QueryInformationVolume
> C:\Users\hansi\Downloads\python-emb\python36.zip SUCCESS
> VolumeCreationTime: 05.05.2015 12:28:45, VolumeSerialNumber: 36B5-A026,
> SupportsObjects: True, VolumeLabel: OS
>
> 07:59:04,3206127 python.exe 4224 QueryAllInformationFile
> C:\Users\hansi\Downloads\python-emb\python36.zip BUFFER OVERFLOW
> CreationTime: 18.04.2017 06:07:23, LastAccessTime: 18.04.2017 06:07:23,
> LastWriteTime: 21.03.2017 09:06:10, ChangeTime: 18.04.2017 06:07:23,
> FileAttributes: N, AllocationSize: 2.228.224, EndOfFile: 2.224.303,
> NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber:
> 0x20000000a9467, EaSize: 0, Access: Read Attributes, Synchronize, Position:
> 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
This looks like a regular Python stat call on Windows. It opens a
handle without following links (i.e. reparse points) and calls
GetFileInformationByHandle. That in turn gets the volume serial number
from the volume information. Then it gets the file information, which
includes the filename. But the FILE_ALL_INFORMATION buffer only has
space for a single character of the name. That's the reason for the
buffer overflow (0x80000005). It's an NTSTATUS warning, not an error,
and it doesn't fail the GetFileInformationByHandle call.
More information about the Python-list
mailing list