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
f4e37670
Commit
f4e37670
authored
Jan 08, 2004
by
Jean Tourrilhes
Committed by
Stephen Hemminger
Jan 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IRDA]: Fix compiler warning in af_irda.c
parent
d80fb43e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
net/irda/af_irda.c
net/irda/af_irda.c
+4
-5
No files found.
net/irda/af_irda.c
View file @
f4e37670
...
@@ -1891,11 +1891,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
...
@@ -1891,11 +1891,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
case
IAS_STRING
:
case
IAS_STRING
:
/* Should check charset & co */
/* Should check charset & co */
/* Check length */
/* Check length */
if
(
ias_opt
->
attribute
.
irda_attrib_string
.
len
>
/* The length is encoded in a __u8, and
IAS_MAX_STRING
)
{
* IAS_MAX_STRING == 256, so there is no way
kfree
(
ias_opt
);
* userspace can pass us a string too large.
return
-
EINVAL
;
* Jean II */
}
/* NULL terminate the string (avoid troubles) */
/* NULL terminate the string (avoid troubles) */
ias_opt
->
attribute
.
irda_attrib_string
.
string
[
ias_opt
->
attribute
.
irda_attrib_string
.
len
]
=
'\0'
;
ias_opt
->
attribute
.
irda_attrib_string
.
string
[
ias_opt
->
attribute
.
irda_attrib_string
.
len
]
=
'\0'
;
/* Add a string attribute */
/* Add a string attribute */
...
...
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