Mesa (master): mesa: s/snprintf/_mesa_snprintf/

Vinson Lee vlee at kemper.freedesktop.org
Tue Jul 13 07:32:28 UTC 2010


Module: Mesa
Branch: master
Commit: c4066b78c0aad41c199eb27157538c2ec9ab5bfd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4066b78c0aad41c199eb27157538c2ec9ab5bfd

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Jul 13 00:31:37 2010 -0700

mesa: s/snprintf/_mesa_snprintf/

---

 src/mesa/main/enums.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 456d206..bc18e1b 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -5648,7 +5648,8 @@ const char *_mesa_lookup_enum_by_nr( int nr )
    }
    else {
       /* this is not re-entrant safe, no big deal here */
-      sprintf(token_tmp, "0x%x", nr);
+      _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr);
+      token_tmp[sizeof(token_tmp) - 1] = '\0';
       return token_tmp;
    }
 }




More information about the mesa-commit mailing list