projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56da240
)
glapi: use _mesa_snprintf()
author
Brian Paul
<brianp@vmware.com>
Tue, 13 Jul 2010 13:44:35 +0000
(07:44 -0600)
committer
Brian Paul
<brianp@vmware.com>
Tue, 13 Jul 2010 13:44:35 +0000
(07:44 -0600)
Note that the enums.c file is generated with this script.
This will preserve the change from commit
c4066b78c0aad41c199eb27157538c2ec9ab5bfd
.
src/mapi/glapi/gen/gl_enums.py
patch
|
blob
|
history
diff --git
a/src/mapi/glapi/gen/gl_enums.py
b/src/mapi/glapi/gen/gl_enums.py
index 644e085522962fff04158f745caaa476603ec8a5..0caa01030fade818e0f752583457bfd729a89061 100644
(file)
--- a/
src/mapi/glapi/gen/gl_enums.py
+++ b/
src/mapi/glapi/gen/gl_enums.py
@@
-105,7
+105,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;
}
}