Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
deebddf2
Commit
deebddf2
authored
25 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
SysAllocStringLen16 needs to handle NULL pointers, too.
parent
7d6e1ea5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/oleaut32/ole2disp.c
+13
-1
13 additions, 1 deletion
dlls/oleaut32/ole2disp.c
with
13 additions
and
1 deletion
dlls/oleaut32/ole2disp.c
+
13
−
1
View file @
deebddf2
...
...
@@ -105,8 +105,20 @@ INT WINAPI SysReAllocString(LPBSTR old,LPCOLESTR in)
BSTR16
WINAPI
SysAllocStringLen16
(
const
char
*
in
,
int
len
)
{
BSTR16
out
=
BSTR_AllocBytes
(
len
+
1
);
if
(
!
out
)
return
0
;
if
(
!
out
)
return
0
;
/*
* Copy the information in the buffer.
* Since it is valid to pass a NULL pointer here, we'll initialize the
* buffer to nul if it is the case.
*/
if
(
in
!=
0
)
strcpy
(
BSTR_GetAddr
(
out
),
in
);
else
memset
(
BSTR_GetAddr
(
out
),
0
,
len
+
1
);
return
out
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment