projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d22d4f
)
Add bounds check for max_queue_size
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Mon, 17 Sep 2012 12:42:51 +0000
(13:42 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Mon, 17 Sep 2012 12:42:51 +0000
(13:42 +0100)
src/main/threads.c
patch
|
blob
|
history
diff --git
a/src/main/threads.c
b/src/main/threads.c
index
fa8771d
..
99ac6ea
100644
(file)
--- a/
src/main/threads.c
+++ b/
src/main/threads.c
@@
-803,6
+803,10
@@
int thread_pool_init(CONF_SECTION *cs, int *spawn_flag)
thread_pool.max_spare_threads = 1;
if (thread_pool.max_spare_threads < thread_pool.min_spare_threads)
thread_pool.max_spare_threads = thread_pool.min_spare_threads;
+ if ((thread_pool.max_queue_size < 2) || (thread_pool.max_queue_size > 1048576)) {
+ radlog(L_ERR, "FATAL: max_queue_size value must be in range 2-1048576");
+ return -1;
+ }
/*
* The pool has already been initialized. Don't spawn