Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b9d6ec3b
Commit
b9d6ec3b
authored
Aug 28, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix MsiRecordGetString for a null buffer and non-zero buffer length.
parent
9a4ce317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
record.c
dlls/msi/record.c
+4
-4
No files found.
dlls/msi/record.c
View file @
b9d6ec3b
...
@@ -307,7 +307,7 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
...
@@ -307,7 +307,7 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
NULL
,
0
,
NULL
,
NULL
);
NULL
,
0
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
rec
->
fields
[
iField
].
u
.
szwVal
,
-
1
,
WideCharToMultiByte
(
CP_ACP
,
0
,
rec
->
fields
[
iField
].
u
.
szwVal
,
-
1
,
szValue
,
*
pcchValue
,
NULL
,
NULL
);
szValue
,
*
pcchValue
,
NULL
,
NULL
);
if
(
*
pcchValue
&&
len
>*
pcchValue
)
if
(
szValue
&&
*
pcchValue
&&
len
>*
pcchValue
)
szValue
[
*
pcchValue
-
1
]
=
0
;
szValue
[
*
pcchValue
-
1
]
=
0
;
if
(
len
)
if
(
len
)
len
--
;
len
--
;
...
@@ -321,7 +321,7 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
...
@@ -321,7 +321,7 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
break
;
break
;
}
}
if
(
*
pcchValue
<=
len
)
if
(
szValue
&&
*
pcchValue
<=
len
)
ret
=
ERROR_MORE_DATA
;
ret
=
ERROR_MORE_DATA
;
*
pcchValue
=
len
;
*
pcchValue
=
len
;
...
@@ -383,13 +383,13 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, unsigned int iField,
...
@@ -383,13 +383,13 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, unsigned int iField,
break
;
break
;
case
MSIFIELD_NULL
:
case
MSIFIELD_NULL
:
len
=
1
;
len
=
1
;
if
(
*
pcchValue
>
0
)
if
(
szValue
&&
*
pcchValue
>
0
)
szValue
[
0
]
=
0
;
szValue
[
0
]
=
0
;
default:
default:
break
;
break
;
}
}
if
(
*
pcchValue
<=
len
)
if
(
szValue
&&
*
pcchValue
<=
len
)
ret
=
ERROR_MORE_DATA
;
ret
=
ERROR_MORE_DATA
;
*
pcchValue
=
len
;
*
pcchValue
=
len
;
...
...
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