projects
/
platform
/
upstream
/
glslang.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68d78fd
)
Fix incorrect used of snprintf()
author
John Kessenich
<cepheus@frii.com>
Mon, 13 Jul 2015 01:39:51 +0000
(19:39 -0600)
committer
John Kessenich
<cepheus@frii.com>
Mon, 13 Jul 2015 01:39:51 +0000
(19:39 -0600)
SPIRV/GlslangToSpv.cpp
patch
|
blob
|
history
diff --git
a/SPIRV/GlslangToSpv.cpp
b/SPIRV/GlslangToSpv.cpp
index
a3b937a
..
ce37085
100644
(file)
--- a/
SPIRV/GlslangToSpv.cpp
+++ b/
SPIRV/GlslangToSpv.cpp
@@
-2545,8
+2545,9
@@
namespace glslang {
void GetSpirvVersion(std::string& version)
{
- char buf[10];
- snprintf(buf, "0.%d", spv::Version);
+ const int bufSize = 10;
+ char buf[bufSize];
+ snprintf(buf, bufSize, "0.%d", spv::Version);
version = buf;
}