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
16a83b4f
Commit
16a83b4f
authored
Aug 25, 2015
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: masq_info: check fgets return value
parent
df48bbef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/masq_info.c
lib/masq_info.c
+5
-1
No files found.
lib/masq_info.c
View file @
16a83b4f
...
@@ -174,7 +174,11 @@ int ip_masq_info(int numeric_host, int numeric_port, int ext)
...
@@ -174,7 +174,11 @@ int ip_masq_info(int numeric_host, int numeric_port, int ext)
fclose
(
f
);
fclose
(
f
);
return
(
-
1
);
return
(
-
1
);
}
}
fgets
(
buf
,
sizeof
(
buf
),
f
);
if
(
fgets
(
buf
,
sizeof
(
buf
),
f
)
==
NULL
)
{
EINTERN
(
"masq_info"
,
"fgets() failed"
);
fclose
(
f
);
return
(
-
1
);
}
has_pdelta
=
strstr
(
buf
,
"PDelta"
)
?
1
:
0
;
has_pdelta
=
strstr
(
buf
,
"PDelta"
)
?
1
:
0
;
mslist
=
(
struct
masq
*
)
malloc
(
16
*
sizeof
(
struct
masq
));
mslist
=
(
struct
masq
*
)
malloc
(
16
*
sizeof
(
struct
masq
));
...
...
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