Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
iproute2
Commits
fb9b1d0f
Commit
fb9b1d0f
authored
Feb 07, 2005
by
osdl.net!shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix potential memory corruption
(Logical change 1.136)
parent
b209eda9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
ChangeLog
ChangeLog
+5
-0
include/utils.h
include/utils.h
+2
-2
lib/utils.c
lib/utils.c
+3
-2
tc/q_netem.c
tc/q_netem.c
+1
-1
No files found.
ChangeLog
View file @
fb9b1d0f
2005-02-07 Jean-Marc Ranger <jmranger@sympatico.ca>
* need to call getline() with null for first usage
* don't overwrite const arg
2005-02-07 Stephen Hemminger <shemminger@linux.site>
* Add experimental distribution
...
...
include/utils.h
View file @
fb9b1d0f
...
...
@@ -66,9 +66,9 @@ struct ipx_addr {
extern
__u32
get_addr32
(
const
char
*
name
);
extern
int
get_addr_1
(
inet_prefix
*
dst
,
const
char
*
arg
,
int
family
);
extern
int
get_prefix_1
(
inet_prefix
*
dst
,
c
onst
c
har
*
arg
,
int
family
);
extern
int
get_prefix_1
(
inet_prefix
*
dst
,
char
*
arg
,
int
family
);
extern
int
get_addr
(
inet_prefix
*
dst
,
const
char
*
arg
,
int
family
);
extern
int
get_prefix
(
inet_prefix
*
dst
,
c
onst
c
har
*
arg
,
int
family
);
extern
int
get_prefix
(
inet_prefix
*
dst
,
char
*
arg
,
int
family
);
extern
int
get_integer
(
int
*
val
,
const
char
*
arg
,
int
base
);
extern
int
get_unsigned
(
unsigned
*
val
,
const
char
*
arg
,
int
base
);
...
...
lib/utils.c
View file @
fb9b1d0f
...
...
@@ -200,7 +200,7 @@ int get_addr_1(inet_prefix *addr, const char *name, int family)
return
0
;
}
int
get_prefix_1
(
inet_prefix
*
dst
,
c
onst
c
har
*
arg
,
int
family
)
int
get_prefix_1
(
inet_prefix
*
dst
,
char
*
arg
,
int
family
)
{
int
err
;
unsigned
plen
;
...
...
@@ -222,6 +222,7 @@ int get_prefix_1(inet_prefix *dst, const char *arg, int family)
slash
=
strchr
(
arg
,
'/'
);
if
(
slash
)
*
slash
=
0
;
err
=
get_addr_1
(
dst
,
arg
,
family
);
if
(
err
==
0
)
{
switch
(
dst
->
family
)
{
...
...
@@ -262,7 +263,7 @@ int get_addr(inet_prefix *dst, const char *arg, int family)
return
0
;
}
int
get_prefix
(
inet_prefix
*
dst
,
c
onst
c
har
*
arg
,
int
family
)
int
get_prefix
(
inet_prefix
*
dst
,
char
*
arg
,
int
family
)
{
if
(
family
==
AF_PACKET
)
{
fprintf
(
stderr
,
"Error:
\"
%s
\"
may be inet prefix, but it is not allowed in this context.
\n
"
,
arg
);
...
...
tc/q_netem.c
View file @
fb9b1d0f
...
...
@@ -56,7 +56,7 @@ static int get_distribution(const char *type, __s16 *data)
int
n
;
long
x
;
size_t
len
;
char
*
line
;
char
*
line
=
NULL
;
char
name
[
128
];
snprintf
(
name
,
sizeof
(
name
),
"/usr/lib/tc/%s.dist"
,
type
);
...
...
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