On Mon, 2014-08-18 at 09:20 +0300, Francisco Jerez wrote: > EdB <edb+m...@sigluy.net> writes: > > > compact::string is not \0 terminated. > > size() need to be used for std::string creation > > --- > > src/gallium/state_trackers/clover/core/program.cpp | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/gallium/state_trackers/clover/core/program.cpp > > b/src/gallium/state_trackers/clover/core/program.cpp > > index e09c3aa..3f504d5 100644 > > --- a/src/gallium/state_trackers/clover/core/program.cpp > > +++ b/src/gallium/state_trackers/clover/core/program.cpp > > @@ -61,9 +61,9 @@ program::build(const ref_vector<device> &devs, const char > > *opts) { > > dev.ir_target(), > > build_opts(dev), > > log)); > > _binaries.insert({ &dev, module }); > > - _logs.insert({ &dev, std::string(log.c_str()) }); > > + _logs.insert({ &dev, std::string(log.c_str(), log.size()) }); > > } catch (const build_error &) { > > - _logs.insert({ &dev, std::string(log.c_str()) }); > > + _logs.insert({ &dev, std::string(log.c_str(), log.size()) }); > > Both of these should just be using the conversion operator. See > attachment.
I came up with an almost identical patch to your attachment. you can add my Reviewed-by: Jan Vesely <jan.ves...@rutgers.edu> > > > throw; > > } > > } > > -- > > 2.0.4 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev -- Jan Vesely <jan.ves...@rutgers.edu>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev