OSDN Git Service

Fix buffer overflow for array index out of bounds in test_07
authorLim Siew Hoon <siew.hoon.lim@intel.com>
Fri, 1 Jul 2016 03:13:23 +0000 (11:13 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 22 Aug 2016 05:04:29 +0000 (13:04 +0800)
commitd37c042e20d1e91f86042b8ca47dd70eac3e2b8c
tree419d4c24dcc35f96597d86ce2c50a7a762141cb5
parentb6ee5d57d62999bfb4a098145f3dd8ebcff954c2
Fix buffer overflow for array index out of bounds in test_07

The size of array surface_1 is 2, but it passed to test_unique_surfaces
func is 16 or 6 to do compare for surface_16. The index for surface_1
not in the array index range for surface_1 and access invalid memory
location.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit e4535e404d1dc33fb1fddf99f057c341fc652bfd)
test/basic/test_07.c