Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9fa8ebb4
Commit
9fa8ebb4
authored
Jan 19, 2004
by
Chris Wright
Committed by
David S. Miller
Jan 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IRDA]: Check error return from memcpy_fromiovec()
parent
84733260
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
net/irda/af_irda.c
net/irda/af_irda.c
+15
-3
No files found.
net/irda/af_irda.c
View file @
9fa8ebb4
...
@@ -1307,7 +1307,11 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -1307,7 +1307,11 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
skb_reserve
(
skb
,
self
->
max_header_size
+
16
);
skb_reserve
(
skb
,
self
->
max_header_size
+
16
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
err
=
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
return
err
;
}
/*
/*
* Just send the message to TinyTP, and let it deal with possible
* Just send the message to TinyTP, and let it deal with possible
...
@@ -1550,7 +1554,11 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
...
@@ -1550,7 +1554,11 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG
(
4
,
"%s(), appending user data
\n
"
,
__FUNCTION__
);
IRDA_DEBUG
(
4
,
"%s(), appending user data
\n
"
,
__FUNCTION__
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
err
=
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
return
err
;
}
/*
/*
* Just send the message to TinyTP, and let it deal with possible
* Just send the message to TinyTP, and let it deal with possible
...
@@ -1613,7 +1621,11 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
...
@@ -1613,7 +1621,11 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG
(
4
,
"%s(), appending user data
\n
"
,
__FUNCTION__
);
IRDA_DEBUG
(
4
,
"%s(), appending user data
\n
"
,
__FUNCTION__
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
asmptr
=
skb
->
h
.
raw
=
skb_put
(
skb
,
len
);
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
err
=
memcpy_fromiovec
(
asmptr
,
msg
->
msg_iov
,
len
);
if
(
err
)
{
kfree_skb
(
skb
);
return
err
;
}
err
=
irlmp_connless_data_request
(
self
->
lsap
,
skb
);
err
=
irlmp_connless_data_request
(
self
->
lsap
,
skb
);
if
(
err
)
{
if
(
err
)
{
...
...
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