[Mesa-dev] [PATCH] mesa: do not use format string as literal string
Emil Velikov
emil.l.velikov at gmail.com
Wed Jun 28 11:54:40 UTC 2017
On 28 June 2017 at 12:46, Juan A. Suarez Romero <jasuarez at igalia.com> wrote:
> This fixes a couple of errors when building in Android:
>
> external/mesa3d/src/mesa/main/shaderapi.c:293:49: error: format string
> is not a string literal (potentially insecure)
> [-Werror,-Wformat-security]
> _mesa_error(ctx, GL_INVALID_OPERATION, caller);
> ^~~~~~
> external/mesa3d/src/mesa/main/shaderapi.c:293:49: note: treat the string
> as an argument to avoid this
> _mesa_error(ctx, GL_INVALID_OPERATION, caller);
> ^
Have you tried annotating caller as "const char * const caller"? IIRC
it was sufficient in some cases, although I'm not sure if it'll help
here.
-Emil
More information about the mesa-dev
mailing list