app/testpmd: fix potential out of bounds read