aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-01 18:15:00 +0200
committerThomas White <taw@physics.org>2010-04-01 18:15:00 +0200
commit55593262bc6c676d70d65336f7d86aca9211b79b (patch)
treee18a5733892bf2cd98417dc5c18a920d8f52255c
parentefbab41e65b5ca0c19b05eee40eb4a4ebadfd262 (diff)
indexamajig: Check that -j argument isn't greater than MAX_THREADS
-rw-r--r--src/indexamajig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 48833db2..e27c8c30 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -493,7 +493,7 @@ int main(int argc, char *argv[])
prefix = strdup("");
}
- if ( nthreads == 0 ) {
+ if ( (nthreads == 0) || (nthreads > MAX_THREADS) ) {
ERROR("Invalid number of threads.\n");
return 1;
}