Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e7f4f3b6
Commit
e7f4f3b6
authored
May 14, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
May 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Prevent possible dereferences (Coverity).
parent
81a9f4a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
smtptransport.c
dlls/inetcomm/smtptransport.c
+6
-3
No files found.
dlls/inetcomm/smtptransport.c
View file @
e7f4f3b6
...
...
@@ -732,7 +732,7 @@ static HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR ps
SMTPTransport
*
This
=
(
SMTPTransport
*
)
iface
;
const
char
szCommandFormat
[]
=
"MAIL FROM: <%s>
\n
"
;
char
*
szCommand
;
int
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszEmailFrom
)
;
int
len
;
HRESULT
hr
;
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
pszEmailFrom
));
...
...
@@ -740,6 +740,7 @@ static HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR ps
if
(
!
pszEmailFrom
)
return
E_INVALIDARG
;
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszEmailFrom
);
szCommand
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
szCommand
)
return
E_OUTOFMEMORY
;
...
...
@@ -758,7 +759,7 @@ static HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR ps
SMTPTransport
*
This
=
(
SMTPTransport
*
)
iface
;
const
char
szCommandFormat
[]
=
"RCPT TO: <%s>
\n
"
;
char
*
szCommand
;
int
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszEmailTo
)
;
int
len
;
HRESULT
hr
;
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
pszEmailTo
));
...
...
@@ -766,6 +767,7 @@ static HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR ps
if
(
!
pszEmailTo
)
return
E_INVALIDARG
;
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszEmailTo
);
szCommand
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
szCommand
)
return
E_OUTOFMEMORY
;
...
...
@@ -833,7 +835,7 @@ static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
SMTPTransport
*
This
=
(
SMTPTransport
*
)
iface
;
const
char
szCommandFormat
[]
=
"AUTH %s
\n
"
;
char
*
szCommand
;
int
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszAuthType
)
;
int
len
;
HRESULT
hr
;
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
pszAuthType
));
...
...
@@ -841,6 +843,7 @@ static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
if
(
!
pszAuthType
)
return
E_INVALIDARG
;
len
=
sizeof
(
szCommandFormat
)
-
2
/* "%s" */
+
strlen
(
pszAuthType
);
szCommand
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
szCommand
)
return
E_OUTOFMEMORY
;
...
...
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