vcl: fix ldp_set_app_name overflow 31/22231/1
authorBenoît Ganne <[email protected]>
Wed, 21 Aug 2019 16:27:23 +0000 (18:27 +0200)
committerAndrew Yourtchenko <[email protected]>
Tue, 24 Sep 2019 19:09:08 +0000 (19:09 +0000)
commit99691949a55113ec7d110da0f6d5430462286c8c
tree403c79dc2e8a7939d40d946776aeed03877c4d88
parent2e0f929b60073b97be0ffdc2d9523cc6c8e6368b
vcl: fix ldp_set_app_name overflow

In case of overflow, we null-terminate the parameter ('app_name')
instead of ldp global name ('ldp->app_name').
Moreover, snprintf() always safely null-terminate the destination string
even in case of overflow.

Type: fix
Fixes: 048b1d6ab7

Change-Id: I4d8b0e020a228e982b6699d652b341c5afe92993
Signed-off-by: Benoît Ganne <[email protected]>
(cherry picked from commit 747b3d8b0e045edb166738ecde99dcc951212988)
src/vcl/ldp.c