ip: fix punt socket overflow 46/34046/6
authorBenoît Ganne <bganne@cisco.com>
Tue, 12 Oct 2021 08:14:30 +0000 (10:14 +0200)
committerBeno�t Ganne <bganne@cisco.com>
Mon, 5 Sep 2022 09:29:35 +0000 (09:29 +0000)
commitedb0d4563c2e808a1c7d9101b2c05087ffb3b279
treea981d8e444a6fb43008676eaabe0781149da0b05
parent934f9b095f2541888eff9c717f2d3e7f793456e0
ip: fix punt socket overflow

client_pathname is usually smaller than pc->caddr.sun_path. snprint()
ensures we stop at the NULL character or sizeof(sun_path) whichever
comes 1st. It also guarantees NULL character termination.

Type: fix

Change-Id: I9fc2a706beab931d50d32d03f7fafca7c6c2fb0b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/ip/punt.c