OSDN Git Service

mesa: properly report the length of truncated log messages
authorMark Janes <mark.a.janes@intel.com>
Fri, 7 Dec 2018 00:35:42 +0000 (16:35 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 25 Mar 2019 15:55:56 +0000 (15:55 +0000)
commitf29b229664ed181169c777f151e902a7b405611e
tree84f41714749bc3bd5cacf23e55da18b814808464
parent2c163bfe68a970a9fc323ceade7dee7feee77ae9
mesa: properly report the length of truncated log messages

_mesa_log_msg must provide the length of the string passed into the
KHR_debug api.  When the string formatted by _mesa_gl_vdebugf exceeds
MAX_DEBUG_MESSAGE_LENGTH, the length is incorrectly set to the number
of characters that would have been written if enough space had been
available.

Fixes: 30256805784450b8bb9d4dabfb56226271ca9d24
       ("mesa: Add support for GL_ARB_debug_output with dynamic ID allocation.")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit eb1a869a5d19bfd8a0d4099afd58f180997e4663)
src/mesa/main/errors.c