]> git.droids-corp.org - dpdk.git/commit
vhost/crypto: fix descriptor processing
authorDavid Marchand <david.marchand@redhat.com>
Wed, 22 Jun 2022 15:30:20 +0000 (17:30 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 22 Jun 2022 16:58:31 +0000 (18:58 +0200)
commit2fbada91545c004f04449500af0c6276900317ab
tree5c36ad214d4dd5aa0a2be8862b88679d450011cd
parent5729407fa4d612b93ceefacef13f57c1de2ceaa6
vhost/crypto: fix descriptor processing

copy_data was returning a pointer to an increased (off by one) descriptor.
Subsequent calls to copy_data in the library were then failing.
Fix this by incrementing the descriptor only if there is some left data
to copy.

Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12")
Cc: stable@dpdk.org
Reported-by: Jakub Poczatek <jakub.poczatek@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
lib/vhost/vhost_crypto.c