Update of /cvsroot/boost/boost/tools/jam/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16079

Modified Files:
      Tag: Boost_Jam_994
        jam.c 
Log Message:
Add check on pipe descriptor values.


Index: jam.c
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/jam.c,v
retrieving revision 1.41.2.3
retrieving revision 1.41.2.4
diff -u -d -r1.41.2.3 -r1.41.2.4
--- jam.c       2 Jun 2007 21:55:30 -0000       1.41.2.3
+++ jam.c       4 Jun 2007 15:11:54 -0000       1.41.2.4
@@ -271,8 +271,15 @@
         globs.noexec++, globs.debug[2] = 1;
 
     if( ( s = getoptval( optv, 'p', 0 ) ) )
+    {
         /* undocumented -p3 (acts like both -p1 -p2) means separate pipe 
action stdout and stderr */
         globs.pipe_action = atoi(s);
+        if (3 < globs.pipe_action || globs.pipe_action < 0)
+        {
+            printf( "Invalid pipe descriptor '%d', valid values are 
-p[0..3].\n", globs.pipe_action);
+            exit(EXITBAD);
+        }
+    }
 
     if( ( s = getoptval( optv, 'q', 0 ) ) )
        globs.quitquick = 1;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to