Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/embryo

Dir     : e17/libs/embryo/src/bin


Modified Files:
        embryo_cc_sc1.c 


Log Message:


check argc count before argv ptr.

===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- embryo_cc_sc1.c     11 Apr 2008 19:06:18 -0000      1.41
+++ embryo_cc_sc1.c     6 May 2008 09:18:56 -0000       1.42
@@ -21,7 +21,7 @@
  *  must not be misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source
  *  distribution.
- *  Version: $Id: embryo_cc_sc1.c,v 1.41 2008/04/11 19:06:18 doursse Exp $
+ *  Version: $Id: embryo_cc_sc1.c,v 1.42 2008/05/06 09:18:56 raster Exp $
  */
 
 /*
@@ -614,7 +614,7 @@
 
    for (i = 1; i < argc; i++)
    {
-      if (!strcmp (argv[i], "-i") && *argv[i + 1])
+      if (!strcmp (argv[i], "-i") && (i + 1 < argc) && *argv[i + 1])
       {
         /* include directory */
         i++;
@@ -629,13 +629,13 @@
 
         insert_path(str);
       }
-      else if (!strcmp (argv[i], "-o") && *argv[i + 1])
+      else if (!strcmp (argv[i], "-o") && (i + 1 < argc) && *argv[i + 1])
       {
         /* output file */
         i++;
         strcpy(oname, argv[i]); /* FIXME */
       }
-      else if (!strcmp (argv[i], "-S") && *argv[i + 1])
+      else if (!strcmp (argv[i], "-S") && (i + 1 < argc) && *argv[i + 1])
       {
         /* stack size */
         i++;



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to