summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/util
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2014-08-18 15:25:35 +0300
committerFrancisco Jerez <[email protected]>2014-09-05 09:27:20 +0300
commitb4539274b6478249d52e99fa34243daacf48be80 (patch)
tree1fd0c8ccd1ab5e072b4276a728791b32340a5e5b /src/gallium/state_trackers/clover/util
parent923c72982e9cdc9766e395f709aeae95e1d2424e (diff)
clover/util: Null-terminate the result of compat::string::c_str().
Reported-by: EdB <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/util')
-rw-r--r--src/gallium/state_trackers/clover/util/compat.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/util/compat.hpp b/src/gallium/state_trackers/clover/util/compat.hpp
index e0ab965eee6..73055775293 100644
--- a/src/gallium/state_trackers/clover/util/compat.hpp
+++ b/src/gallium/state_trackers/clover/util/compat.hpp
@@ -361,7 +361,9 @@ namespace clover {
const char *
c_str() const {
- return begin();
+ v.reserve(size() + 1);
+ *v.end() = 0;
+ return v.begin();
}
const char *