"Virden, Larry W." <[EMAIL PROTECTED]> writes: > "Tony Lewis" <[EMAIL PROTECTED]> writes: > >> Wget has an `aprintf' utility function that allocates the result on > the heap. Avoids both buffer overruns and >> arbitrary limits on file name length. > > If it uses the heap, then doesn't that open a hole where a particularly > long file name would overflow the heap?
No, aprintf tries to allocate as much memory as necessary. If the memory is unavailable, malloc returns NULL and Wget exits.
