]> git.puffer.fish Git - matthieu/frr.git/commit
lib: fix __darr_in_vsprintf
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 5 Feb 2024 17:04:39 +0000 (19:04 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 4 Mar 2024 00:24:26 +0000 (02:24 +0200)
commitee0c1cc1e4b87bde73f1eba3212ab93b1c379c6c
tree3bb2f8dbce0250d7a7284f3ab04048d4372f0d9b
parente3bc6e39e4b7c54dbe8784a2f93d98c95441c3d0
lib: fix __darr_in_vsprintf

If the initial darr capacity is not enough for the output, the `ap` is
reused multiple times, which is wrong, because it may be altered by
`vsnprintf`. Make a copy of `ap` each time instead of reusing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/darr.c