loader: Fix validation error
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 21 Dec 2016 23:24:34 +0000 (16:24 -0700)
committerCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 21 Dec 2016 23:35:36 +0000 (16:35 -0700)
commit888dda2cf3deac0364100afd5efa5a0f4d7e4f2c
tree34c87686f208a085bde87625715f9980baa10c02
parentabf1b84c07239b361cb6a1d8767c0efa4e6dd181
loader: Fix validation error

The string length validation will not detect strings
that exceed the max length.
For example, when i = max_length-1 and utf8[i] is a valid
character (>= 0x20 and < 0x7f) no error is thrown and
the next iteration will end the loop.
This change extends the loop and the if check to
catch this issue.
layers/vk_layer_utils.cpp
loader/loader.c