diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/errors.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index a9687913627..30560ba047e 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -231,6 +231,9 @@ _mesa_gl_vdebug(struct gl_context *ctx, _mesa_debug_get_id(id); len = _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args); + if (len >= MAX_DEBUG_MESSAGE_LENGTH) + /* message was truncated */ + len = MAX_DEBUG_MESSAGE_LENGTH - 1; _mesa_log_msg(ctx, source, type, *id, severity, len, s); } |