Re: [hackers] [sbase] libutil/recurse: Simplify adding trailing slash || Michael Forney

From: Laslo Hunhold <dev_AT_frign.de>
Date: Tue, 23 Jun 2020 09:05:35 +0200

On Sun, 21 Jun 2020 07:20:29 +0200 (CEST)
git_AT_suckless.org wrote:

Dear Michael,

> We know that r->pathlen < sizeof(r->path) since r->path is
> nul-terminated, so we can safely add a '/' here. If there is no
> space left over for the rest of the path and nul-terminator, this
> will be caught by the subsequent estrlcpy.

isn't that a bug waiting to happen when anything about the semantics of
the function later changes?

With best regards

Laslo
Received on Tue Jun 23 2020 - 09:05:35 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 23 2020 - 09:12:31 CEST