Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cab74c83
Commit
cab74c83
authored
Feb 12, 2008
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of r60743:
Patch #1736: Fix file name handling of _msi.FCICreate.
parent
08303dbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Misc/NEWS
Misc/NEWS
+2
-0
PC/_msi.c
PC/_msi.c
+9
-9
No files found.
Misc/NEWS
View file @
cab74c83
...
...
@@ -231,6 +231,8 @@ Library
Extension
Modules
-----------------
-
Patch
#
1736
:
Fix
file
name
handling
of
_msi
.
FCICreate
.
-
Backport
r59862
(
issue
#
712900
):
make
long
regexp
matches
interruptable
.
-
#
1940
:
make
it
possible
to
use
curses
.
filter
()
before
curses
.
initscr
()
...
...
PC/_msi.c
View file @
cab74c83
...
...
@@ -180,12 +180,12 @@ static FNFCIGETOPENINFO(cb_getopeninfo)
static
PyObject
*
fcicreate
(
PyObject
*
obj
,
PyObject
*
args
)
{
char
*
cabname
;
char
*
cabname
,
*
p
;
PyObject
*
files
;
CCAB
ccab
;
HFCI
hfci
;
ERF
erf
;
in
t
i
;
Py_ssize_
t
i
;
if
(
!
PyArg_ParseTuple
(
args
,
"sO:FCICreate"
,
&
cabname
,
&
files
))
...
...
@@ -208,22 +208,22 @@ static PyObject* fcicreate(PyObject* obj, PyObject* args)
ccab
.
setID
=
0
;
ccab
.
szDisk
[
0
]
=
'\0'
;
for
(
i
=
0
;
cabname
[
i
];
i
++
)
if
(
cabname
[
i
]
==
'\\'
||
cabname
[
i
]
==
'/'
)
break
;
for
(
i
=
0
,
p
=
cabname
;
*
p
;
p
=
CharNext
(
p
)
)
if
(
*
p
==
'\\'
||
*
p
==
'/'
)
i
=
p
-
cabname
+
1
;
if
(
i
>
sizeof
(
ccab
.
szCabPath
)
||
strlen
(
cabname
+
i
)
>
sizeof
(
ccab
.
szCab
))
{
if
(
i
>
=
sizeof
(
ccab
.
szCabPath
)
||
strlen
(
cabname
+
i
)
>
=
sizeof
(
ccab
.
szCab
))
{
PyErr_SetString
(
PyExc_ValueError
,
"path name too long"
);
return
0
;
}
if
(
cabname
[
i
]
)
{
if
(
i
>
0
)
{
memcpy
(
ccab
.
szCabPath
,
cabname
,
i
);
ccab
.
szCabPath
[
i
]
=
'\0'
;
strcpy
(
ccab
.
szCab
,
cabname
+
i
);
}
else
{
strcpy
(
ccab
.
szCabPath
,
"."
);
strcpy
(
ccab
.
szCabPath
,
".
\\
"
);
strcpy
(
ccab
.
szCab
,
cabname
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment