===================================================================
@@ -1927,9 +1927,10 @@
-- Start of processing for Normalize_Pathname
begin
- -- Special case, if name is null, then return null
+ -- Special case, return null if name is null, or if it is bigger than
+ -- the biggest name allowed.
- if Name'Length = 0 then
+ if Name'Length = 0 or else Name'Length > Max_Path then
return "";
end if;
===================================================================
@@ -445,9 +445,10 @@
-- directory pointed to. This is slightly less efficient, since it
-- requires system calls.
--
- -- If Name cannot be resolved or is null on entry (for example if there is
- -- symbolic link circularity, e.g. A is a symbolic link for B, and B is a
- -- symbolic link for A), then Normalize_Pathname returns an empty string.
+ -- If Name cannot be resolved, is invalid (for example if it is too big) or
+ -- is null on entry (for example if there is symbolic link circularity,
+ -- e.g. A is a symbolic link for B, and B is a symbolic link for A), then
+ -- Normalize_Pathname returns an empty string.
--
-- In VMS, if Name follows the VMS syntax file specification, it is first
-- converted into Unix syntax. If the conversion fails, Normalize_Pathname