chicken-hackers
[Top][All Lists]
Advanced

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

[PATCH] Unhardcode the maximum buffer size for getcwd


From: Mario Domenech Goulart
Subject: [PATCH] Unhardcode the maximum buffer size for getcwd
Date: Mon, 22 Aug 2022 23:09:23 +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.

All the best.
Mario
-- 
http://parenteses.org/mario

Attachment: 0001-Use-C_MAX_PATH-as-maximum-buffer-size-for-getcwd.patch
Description: Text Data

Attachment: 0001-Make-C_curdir-get-the-buffer-size-as-argument.patch
Description: Text Data


reply via email to

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