jcf-parse.c (yyparse): variable len changed from a char to an int to prevent overflow.
authorAndrew Haley <aph@viagra.cygnus.co.uk>
Thu, 7 Jan 1999 10:15:33 +0000 (10:15 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 7 Jan 1999 10:15:33 +0000 (10:15 +0000)
1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
* jcf-parse.c (yyparse): variable len changed from a char to an
int to prevent overflow.

From-SVN: r24560

gcc/java/ChangeLog
gcc/java/jcf-parse.c

index 990890e..5c1895c 100644 (file)
@@ -1,3 +1,8 @@
+1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
+
+       * jcf-parse.c (yyparse): variable len changed from a char to an
+       int to prevent overflow.
+
 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
 
        * java-tree.h:  Declare read_class.
index 27ac86c..b3144d3 100644 (file)
@@ -769,9 +769,9 @@ yyparse ()
 
       if (list[0]) 
        {
-         char *value, len;
+         char *value;
 
-         len = strlen (list);
+         int len = strlen (list);
          /* FIXME: this test is only needed until our .java parser is
             fully capable.  */
          if (len > 5 && ! strcmp (&list[len - 5], ".java"))