2009-02-25 Laurent GUERBY <laurent@guerby.net>
* a-teioed.adb (Expand): Fix Result overflow.
From-SVN: r144427
+2009-02-25 Laurent GUERBY <laurent@guerby.net>
+
+ * a-teioed.adb (Expand): Fix Result overflow.
+
2009-02-25 Laurent GUERBY <laurent@guerby.net>
* gcc-interface/Makefile.in: Fix multilib handling for
-- character has already been made, so a count of one is a
-- no-op, and a count of zero erases a character.
+ if Result_Index + Count - 2 > Result'Last then
+ raise Picture_Error;
+ end if;
+
for J in 2 .. Count loop
Result (Result_Index + J - 2) := Picture (Picture_Index - 1);
end loop;
raise Picture_Error;
when others =>
+ if Result_Index > Result'Last then
+ raise Picture_Error;
+ end if;
+
Result (Result_Index) := Picture (Picture_Index);
Picture_Index := Picture_Index + 1;
Result_Index := Result_Index + 1;