Commit 0af8a7d5 authored by Mark Janes's avatar Mark Janes
Browse files

mesa/objectlabel: handle NULL src string

This prevents a crash when a NULL src is passed with a non-NULL length.

fixes: dEQP-GLES31.functional.debug.object_labels.query_length_only

Signed-off-by: Mark Janes's avatarMark Janes <>
Reviewed-by: default avatarDave Airlie <>
parent 265fe9dc
......@@ -104,13 +104,14 @@ copy_label(const GLchar *src, GLchar *dst, GLsizei *length, GLsizei bufSize)
* will be returned in <length>."
if (src)
labelLen = strlen(src);
if (bufSize == 0) {
if (length)
*length = strlen(src);
*length = labelLen;
if (src)
labelLen = strlen(src);
if (dst) {
if (src) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment