examples/performance-thread: fix out-of-bounds tls array
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Wed, 20 Sep 2017 08:20:24 +0000 (10:20 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Oct 2017 23:22:29 +0000 (01:22 +0200)
commitc874523dc9fc9c384a760eb5db8c6f295185e5e3
tree27fe06fc5bdb265bd9bca0390f832344604068ff
parent72481c87ec80542cabf65fa8ad32ac381ee5ce4e
examples/performance-thread: fix out-of-bounds tls array

Overrunning array per_lcore_this_sched->current_lthread->tls->data of
1024 8-byte elements at element index 1024 using index k.
Fixed by correct check k condition.

Coverity issue: 143462, 143463
Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
examples/performance-thread/common/lthread_tls.c