[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Unhardcode the maximum buffer size for getcwd

From: felix . winkelmann
Subject: Re: [PATCH] Unhardcode the maximum buffer size for getcwd
Date: Tue, 23 Aug 2022 11:01:02 +0200

> Hi,
> Attached are two patchs to unhardcode the maximum buffer size used as
> argument to getcwd.  Please select at most one (if any).
> The first one
> (0001-Use-C_MAX_PATH-as-maximum-buffer-size-for-getcwd.patch) is just a
> simple replacement (it replaces 1024 with C_MAX_PATH).
> I tend to think that it would be better to have the maximum buffer size
> given as argument to C_curdir, so that we don't risk having a mismatch
> between the actual buffer size given to C_curdir and the buffer size
> given to getcwd.  Assuming C_curdir is not part of the C API, the second
> patch (0001-Make-C_curdir-get-the-buffer-size-as-argument.patch)
> uses that approach.

Thanks, Mario! The 2nd approach looks indeed better, so I've
pushed that one.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]