Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
3cf24e0a
Commit
3cf24e0a
authored
Mar 07, 2006
by
Michael Smith
Browse files
Add a missing check for LOG_MAXLOGS, fix another check to be >= rather than >
svn path=/icecast/trunk/log/; revision=10973
parent
82f1ebf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/log/log.c
View file @
3cf24e0a
...
...
@@ -312,8 +312,7 @@ void log_write(int log_id, unsigned priority, const char *cat, const char *func,
time_t
now
;
va_list
ap
;
if
(
log_id
<
0
)
return
;
if
(
log_id
>
LOG_MAXLOGS
)
return
;
/* Bad log number */
if
(
log_id
<
0
||
log_id
>=
LOG_MAXLOGS
)
return
;
/* Bad log number */
if
(
loglist
[
log_id
].
level
<
priority
)
return
;
if
(
priority
>
sizeof
(
prior
)
/
sizeof
(
prior
[
0
]))
return
;
/* Bad priority */
...
...
@@ -346,7 +345,7 @@ void log_write_direct(int log_id, const char *fmt, ...)
char
filename_tyme
[
128
];
time_t
now
;
if
(
log_id
<
0
)
return
;
if
(
log_id
<
0
||
log_id
>=
LOG_MAXLOGS
)
return
;
va_start
(
ap
,
fmt
);
...
...
Write
Preview
Supports
Markdown
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