Module: Mesa Branch: staging/18.1 Commit: 4a44ff8bad537bfac02c3d9ce34a6386c8983429 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a44ff8bad537bfac02c3d9ce34a6386c8983429
Author: Andrii Simiklit <[email protected]> Date: Thu Sep 6 17:43:52 2018 +0300 mesa/util: don't use the same 'va_list' instance twice The first usage of the 'va_list' instance could change it. Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]> (cherry picked from commit 570cacba7af165175ad40820c5e663db5b1c5066) --- src/util/u_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/u_string.h b/src/util/u_string.h index ce454308d7..374c00e0bc 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -119,7 +119,7 @@ util_vasprintf(char **ret, const char *format, va_list ap) /* Compute length of output string first */ va_copy(ap_copy, ap); - int r = util_vsnprintf(NULL, 0, format, ap); + int r = util_vsnprintf(NULL, 0, format, ap_copy); va_end(ap_copy); if (r < 0) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
