|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67277 - trunk/tools/build/v2/engine/src
From: ghost_at_[hidden]
Date: 2010-12-16 12:26:21
Author: vladimir_prus
Date: 2010-12-16 12:26:01 EST (Thu, 16 Dec 2010)
New Revision: 67277
URL: http://svn.boost.org/trac/boost/changeset/67277
Log:
Validate the parameter to -j.
Thanks to Michael Caisse for the bug report.
Text files modified:
trunk/tools/build/v2/engine/src/jam.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Modified: trunk/tools/build/v2/engine/src/jam.c
==============================================================================
--- trunk/tools/build/v2/engine/src/jam.c (original)
+++ trunk/tools/build/v2/engine/src/jam.c 2010-12-16 12:26:01 EST (Thu, 16 Dec 2010)
@@ -297,7 +297,14 @@
anyhow++;
if ( ( s = getoptval( optv, 'j', 0 ) ) )
+ {
globs.jobs = atoi( s );
+ if (globs.jobs == 0)
+ {
+ printf("Invalid value for the '-j' option.\n");
+ exit(EXITBAD);
+ }
+ }
if ( ( s = getoptval( optv, 'g', 0 ) ) )
globs.newestfirst = 1;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk