diff options
author | Vinson Lee <vlee@freedesktop.org> | 2012-12-06 22:13:53 -0800 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2012-12-08 15:48:07 -0800 |
commit | 38a148e16e90d0f6f4bdd0c7272b1863b369f42c (patch) | |
tree | 7fc7e1b943d35a8a6943b7591dd81bf500f11575 /tests/util | |
parent | a74518f1c03b827d7e8f04801be0a4f1f2c0358e (diff) |
util: Ensure endptr is initialized.
Fixes uninititalized pointer read defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests/util')
-rw-r--r-- | tests/util/piglit-vbo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp index 97499348..f4fd890b 100644 --- a/tests/util/piglit-vbo.cpp +++ b/tests/util/piglit-vbo.cpp @@ -265,6 +265,10 @@ vertex_attrib_description::parse_datum(const char **text, void *data) const *((GLuint *) data) = (GLuint) value; break; } + default: + assert(!"Unexpected data type"); + endptr = NULL; + break; } *text = endptr; return true; |