Theo Buehler <t...@theobuehler.org> wrote:

> On Thu, Jul 20, 2023 at 05:22:25PM +0200, Theo Buehler wrote:
> > On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote:
> > > I think it is better to use a safe ideom when matching against a peer name
> > > instead of forcefully NUL terminate the string somewhere unrelated.
> > > By default all these string buffers use the same size so strncmp() will
> > > not clip since the peer description is enforced by bgpd to be smaller.
> > >
> > > Another option would be to move
> > >   neighbor->descr[PEER_DESCR_LEN - 1] = 0;
> > > into the match functions. At least then it is certainly done.
> > 
> > I prefer strncpy(). So this diff is ok.
> 
> Ugh. strncmp...

Yes, that's fine :)

Reply via email to