Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
spr0cketeer
Icecast-common
Commits
8a87821b
Commit
8a87821b
authored
Mar 07, 2006
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a missing check for LOG_MAXLOGS, fix another check to be >= rather than >
svn path=/icecast/trunk/log/; revision=10973
parent
8d771bc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
log/log.c
log/log.c
+2
-3
No files found.
log/log.c
View file @
8a87821b
...
...
@@ -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
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