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.

classification
Title: Three bugs of FCICreate (PC/_msi.c)
Type: Stage:
Components: Library (Lib), Windows Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, ocean-city
Priority: normal Keywords: patch

Created on 2008-01-04 14:53 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_msi.patch ocean-city, 2008-01-04 14:53
_msi.patch ocean-city, 2008-02-10 09:48 Refactored
Messages (5)
msg59228 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-01-04 14:53
I have fixed three bugs of msilib.FCICreate()

1. msilib.FCICreate("a.cab") creates ".a.cab" (extra leading dot)

In recent cab SDK's FCI-FDI.doc,

# quote start

The szCab field should contain a string which contains the name of the 
first cabinet to be created (e.g. “APP1.CAB”).  In the event of 
multiple cabinets being created, the GetNextCab function called by the 
FCIAddFile API allows subsequent cabinet names to be specified.

The szCabPath field should contain the complete path of where to create 
the cabinet (e.g. “C:\MYFILES\”).

# quote end

Currently, _msi.c separate "C:\\MYFILES\\APP1.CAB" to szCabPath "C:" 
and szCab "\\MYFILES\\APP1.CAB".

2. Probably, "long names" error check doesn't count null-terminator now.
3. Usually, multibyte character may contain "\\" as trailing-byte. 
(like "ソ" in Japanese) Not to count this as path separator, I used 
CharNext().

Thank you.
msg61557 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-01-23 06:05
Sorry, I lied. What I said in bug 2 was totally wrong.
Meaning of 'i' was changed from original code and my patch.
There is no problem about buffer length. Thank you.
msg61581 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-01-23 14:26
Umm, please forget previous comment.
>>> msilib.FCICreate("a" * 256 + "/" + "b" * 255, [])
crashed on debug build. (CB_MAX_CAB_PATH == 256)
msg62247 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-02-10 09:48
Refactored a little. More clean diff.
msg62317 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-02-12 13:48
Thanks for the patch. Committed as r60743 and r60744.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46077
2008-02-12 13:48:52loewissetstatus: open -> closed
messages: + msg62317
resolution: accepted
2008-02-10 09:48:32ocean-citysetfiles: + _msi.patch
messages: + msg62247
2008-01-23 14:26:28ocean-citysetmessages: + msg61581
title: Two bugs of FCICreate (PC/_msi.c) -> Three bugs of FCICreate (PC/_msi.c)
2008-01-23 06:11:40ocean-citysettitle: Three bugs of FCICreate (PC/_msi.c) -> Two bugs of FCICreate (PC/_msi.c)
2008-01-23 06:05:25ocean-citysetmessages: + msg61557
2008-01-06 22:29:44adminsetkeywords: - py3k
versions: Python 2.6, Python 2.5, Python 3.0
2008-01-04 15:25:57christian.heimessetpriority: normal
assignee: loewis
components: + Windows
keywords: + py3k, patch
nosy: + loewis
2008-01-04 14:53:48ocean-citycreate