-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Enhancement: Add realpath() when resolving config paths to simplify the code and improve log clarity.
The current path‑handling logic in getConfigFile() relies on several chained strncpy/strncat operations. These are easy to get wrong and could cause undefined behavior.
Using realpath() after constructing the intended config path would remove most of this complexity and make the function far more robust resulting in producing a clean, canonical, absolute path for logging. It helps reduce the amount of manual string manipulation required. Canonicalizing the path after construction means fewer buffer‑size calculations, fewer chained string operations, and less risk of off‑by‑one errors or missing terminators.
Reactions are currently unavailable