projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2470750
)
mesa: s/snprintf/_mesa_snprintf/
author
Vinson Lee
<vlee@vmware.com>
Tue, 13 Jul 2010 07:31:37 +0000
(
00:31
-0700)
committer
Vinson Lee
<vlee@vmware.com>
Tue, 13 Jul 2010 07:31:37 +0000
(
00:31
-0700)
src/mesa/main/enums.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/enums.c
b/src/mesa/main/enums.c
index 456d20603dce93fb511eedf3996539f1bb987dee..bc18e1b1131f7715c86451a8e05348af61c8d392 100644
(file)
--- 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;
}
}