ping: fix buffer allocator error handling 31/26431/2
authorDave Barach <dave@barachs.net>
Wed, 8 Apr 2020 16:03:32 +0000 (12:03 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 8 Apr 2020 17:22:21 +0000 (17:22 +0000)
The code sets f->n_vectors = n_to_send, but it can bail out of the
loop if vlib_buffer_copy(...) returns 0.

Need to fix f->n_vectors in the error return path, or we enqueue some
number of 0xfefefefe buffer indices in a debug image or worse in a
production image.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2d886266006c6c1c2f9ef8e3b95eb46ac6c0b3df


No differences found