re PR libfortran/34670 (bounds checking for array intrinsics)
2010-06-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * intrinsics/date_and_time.c: Replace assert with runtime_error when VALUE is too small. From-SVN: r160253
This commit is contained in:
parent
308e51aa12
commit
07fc109c14
@ -1,3 +1,9 @@
|
||||
2010-06-04 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34670
|
||||
* intrinsics/date_and_time.c: Replace assert with runtime_error
|
||||
when VALUE is too small.
|
||||
|
||||
2010-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/43851
|
||||
|
@ -280,8 +280,12 @@ date_and_time (char *__date, char *__time, char *__zone,
|
||||
delta = GFC_DESCRIPTOR_STRIDE(__values,0);
|
||||
if (delta == 0)
|
||||
delta = 1;
|
||||
|
||||
if (unlikely (len < VALUES_SIZE))
|
||||
runtime_error ("Incorrect extent in VALUE argument to"
|
||||
" DATE_AND_TIME intrinsic: is %ld, should"
|
||||
" be >=%ld", (long int) len, (long int) VALUES_SIZE);
|
||||
|
||||
assert (len >= VALUES_SIZE);
|
||||
/* Cope with different type kinds. */
|
||||
if (elt_size == 4)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user