diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 062c368bea4..bb360c0afc0 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2003-01-31 Mark Wielaard + + * gjavah.c (throwable_p): Allocate 1 more byte for string. + 2003-01-31 Nathan Sidwell * class.c (make_class): Use BINFO_ELTS. diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 7c7e3685d5d..42f33276edc 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -1119,7 +1119,7 @@ throwable_p (const unsigned char *clname) for (length = 0; clname[length] != ';' && clname[length] != '\0'; ++length) ; - current = ALLOC (length); + current = ALLOC (length + 1); for (i = 0; i < length; ++i) current[i] = clname[i] == '/' ? '.' : clname[i]; current[length] = '\0';