Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
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
net-tools
Commits
4347ec3e
Commit
4347ec3e
authored
Oct 11, 2006
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Debian Bug #392263 reported by Jochen Voss
(buffer overflow in dev argument processing)
parent
e44dfb3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
ipmaddr.c
ipmaddr.c
+7
-4
No files found.
ipmaddr.c
View file @
4347ec3e
...
...
@@ -291,13 +291,15 @@ static void print_mlist(FILE *fp, struct ma_info *list)
static
int
multiaddr_list
(
int
argc
,
char
**
argv
)
{
struct
ma_info
*
list
=
NULL
;
size_t
l
;
while
(
argc
>
0
)
{
if
(
strcmp
(
*
argv
,
"dev"
)
==
0
)
{
NEXT_ARG
();
if
(
filter_dev
[
0
])
l
=
strlen
(
*
argv
);
if
(
l
<=
0
||
l
>=
sizeof
(
filter_dev
))
usage
();
str
cpy
(
filter_dev
,
*
argv
);
str
ncpy
(
filter_dev
,
*
argv
,
sizeof
(
filter_dev
)
);
}
else
if
(
strcmp
(
*
argv
,
"all"
)
==
0
)
{
filter_family
=
AF_UNSPEC
;
}
else
if
(
strcmp
(
*
argv
,
"ipv4"
)
==
0
)
{
...
...
@@ -307,9 +309,10 @@ static int multiaddr_list(int argc, char **argv)
}
else
if
(
strcmp
(
*
argv
,
"link"
)
==
0
)
{
filter_family
=
AF_PACKET
;
}
else
{
if
(
filter_dev
[
0
])
l
=
strlen
(
*
argv
);
if
(
l
<=
0
||
l
>=
sizeof
(
filter_dev
))
usage
();
str
cpy
(
filter_dev
,
*
argv
);
str
ncpy
(
filter_dev
,
*
argv
,
sizeof
(
filter_dev
)
);
}
argv
++
;
argc
--
;
}
...
...
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