Janne Blomqvist wrote:
> the attached patch avoids a stack overflow crash due to not trying to
> create a null-terminated duplicate of the argument char array on the
> stack. Also, for the common case it avoids an extra allocation and an
> extra memcpy.
>
> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

Looks good to me. Thanks for the patch!

Tobias

> 2014-05-03  Janne Blomqvist  <j...@gcc.gnu.org>
>
>     PR libfortran/61035
>     * intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
>     stack allocation, avoid extra copying in the common case.

Reply via email to