summaryrefslogtreecommitdiff
path: root/gcc/ada/i-cobol.adb
diff options
context:
space:
mode:
authorLaurent GUERBY <laurent@guerby.net>2005-01-26 21:35:50 +0000
committerLaurent Guerby <guerby@gcc.gnu.org>2005-01-26 21:35:50 +0000
commitd487e3c10ad8ed3327106a84c27d97be497b4798 (patch)
treea2342cc1c282f58f2998c71122a2a3bc8bbe48a4 /gcc/ada/i-cobol.adb
parent4bb3aa7e32e8a5f7c5e4df51f23e2a163a89263f (diff)
downloadgcc-d487e3c10ad8ed3327106a84c27d97be497b4798.tar.gz
re PR ada/19414 (ACATS cxb4003 - valgrind detects wrong code (invalid read))
2005-01-26 Laurent GUERBY <laurent@guerby.net> PR ada/19414 * i-cobol.adb (Valid_Numeric): Handle zero length case. From-SVN: r94287
Diffstat (limited to 'gcc/ada/i-cobol.adb')
-rw-r--r--gcc/ada/i-cobol.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/i-cobol.adb b/gcc/ada/i-cobol.adb
index 7dc1f851bed..38de23d8119 100644
--- a/gcc/ada/i-cobol.adb
+++ b/gcc/ada/i-cobol.adb
@@ -632,6 +632,10 @@ package body Interfaces.COBOL is
return Boolean
is
begin
+ if Item'Length = 0 then
+ return False;
+ end if;
+
-- All character positions except first and last must be Digits.
-- This is true for all the formats.