examples/performance-thread: fix out-of-bounds sched array
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Wed, 20 Sep 2017 07:47:34 +0000 (09:47 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Oct 2017 23:22:24 +0000 (01:22 +0200)
commit72481c87ec80542cabf65fa8ad32ac381ee5ce4e
tree898fc73e9da30e8c708049272a8d59f29660412e
parent842ee032e41e678568ffbce29172b346dc09c82b
examples/performance-thread: fix out-of-bounds sched array

Overrunning array schedcore of 128 8-byte elements at element index 128
using index core id.
Fixed by correct check index lcoreid condition and
change type of lcoreid to unsigned.

Coverity issue: 143459, 143461
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.h
examples/performance-thread/common/lthread_sched.c