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
nexedi
linux
Commits
89aebaff
Commit
89aebaff
authored
Jan 08, 2004
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AX25]: Use size_t for size in {send,recv}msg.
parent
df5b6439
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
net/ax25/af_ax25.c
net/ax25/af_ax25.c
+9
-3
No files found.
net/ax25/af_ax25.c
View file @
89aebaff
...
@@ -1401,7 +1401,7 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
...
@@ -1401,7 +1401,7 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
}
}
static
int
ax25_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
ax25_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sockaddr_ax25
*
usax
=
(
struct
sockaddr_ax25
*
)
msg
->
msg_name
;
struct
sockaddr_ax25
*
usax
=
(
struct
sockaddr_ax25
*
)
msg
->
msg_name
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
@@ -1410,7 +1410,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -1410,7 +1410,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
ax25_digi
dtmp
,
*
dp
;
ax25_digi
dtmp
,
*
dp
;
unsigned
char
*
asmptr
;
unsigned
char
*
asmptr
;
ax25_cb
*
ax25
;
ax25_cb
*
ax25
;
int
lv
,
size
,
err
,
addr_len
=
msg
->
msg_namelen
;
size_t
size
;
int
lv
,
err
,
addr_len
=
msg
->
msg_namelen
;
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
{
if
(
msg
->
msg_flags
&
~
(
MSG_DONTWAIT
|
MSG_EOR
))
{
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -1435,6 +1436,11 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -1435,6 +1436,11 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
goto
out
;
goto
out
;
}
}
if
(
len
>
ax25
->
ax25_dev
->
dev
->
mtu
)
{
err
=
-
EMSGSIZE
;
goto
out
;
}
if
(
usax
!=
NULL
)
{
if
(
usax
!=
NULL
)
{
if
(
usax
->
sax25_family
!=
AF_AX25
)
{
if
(
usax
->
sax25_family
!=
AF_AX25
)
{
err
=
-
EINVAL
;
err
=
-
EINVAL
;
...
@@ -1580,7 +1586,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -1580,7 +1586,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
}
}
static
int
ax25_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
ax25_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
size
,
int
flags
)
struct
msghdr
*
msg
,
size_
t
size
,
int
flags
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
...
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