Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
42e52150
Commit
42e52150
authored
Jul 15, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Clean up
- Don't avoid non-existent off-by-one bug, ie. use full buffer size
parent
5e76149b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/stream_output/acl.c
src/stream_output/acl.c
+4
-7
No files found.
src/stream_output/acl.c
View file @
42e52150
...
@@ -278,7 +278,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
...
@@ -278,7 +278,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
{
{
char
line
[
1024
],
*
psz_ip
,
*
ptr
;
char
line
[
1024
],
*
psz_ip
,
*
ptr
;
if
(
fgets
(
line
,
sizeof
(
line
)
-
1
,
file
)
==
NULL
)
if
(
fgets
(
line
,
sizeof
(
line
),
file
)
==
NULL
)
{
{
if
(
ferror
(
file
)
)
if
(
ferror
(
file
)
)
{
{
...
@@ -289,15 +289,12 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
...
@@ -289,15 +289,12 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
continue
;
continue
;
}
}
/* fgets() is cool : never overflow, always nul-terminate */
psz_ip
=
line
;
psz_ip
=
line
;
/* skips blanks */
/* skips blanks
- cannot overflow given '\0' is not space
*/
while
(
isspace
(
*
psz_ip
)
)
while
(
isspace
(
*
psz_ip
)
)
{
if
(
*
psz_ip
==
'\n'
)
continue
;
psz_ip
++
;
psz_ip
++
;
}
ptr
=
strchr
(
psz_ip
,
'\n'
);
ptr
=
strchr
(
psz_ip
,
'\n'
);
if
(
ptr
==
NULL
)
if
(
ptr
==
NULL
)
...
@@ -306,7 +303,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
...
@@ -306,7 +303,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
psz_path
);
psz_path
);
do
do
{
{
fgets
(
line
,
sizeof
(
line
)
-
1
,
file
);
fgets
(
line
,
sizeof
(
line
),
file
);
if
(
ferror
(
file
)
||
feof
(
file
)
)
if
(
ferror
(
file
)
||
feof
(
file
)
)
{
{
msg_Err
(
p_acl
->
p_owner
,
"Error reading %s : %s
\n
"
,
msg_Err
(
p_acl
->
p_owner
,
"Error reading %s : %s
\n
"
,
...
...
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