[Piglit] [PATCH] util: Ensure endptr is initialized.

Brian Paul brian.e.paul at gmail.com
Fri Dec 7 06:44:00 PST 2012


On Thu, Dec 6, 2012 at 11:20 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes uninititalized pointer read defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/util/piglit-vbo.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp
> index 9749934..6ea4b1a 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(0);
> +               endptr = NULL;
> +               break;
>         }
>         *text = endptr;
>         return true;

Same assertion comment as the other patch.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list