> On March 15, 2014, 8:46 a.m., Till Toenshoff wrote: > >
Great extension, thanks Dominic. Super valuable for my current work. > On March 15, 2014, 8:46 a.m., Till Toenshoff wrote: > > 3rdparty/libprocess/src/subprocess.cpp, line 77 > > <https://reviews.apache.org/r/19162/diff/4/?file=519657#file519657line77> > > > > Aren't you are missing the terminating 0? How about using "calloc" or > > size()+1? That certainly is for both, allocation and copying. So make it: envp_[index] = static_cast<char*>( malloc((entry.size() + 1) * sizeof(char))); memcpy(envp_[index], entry.c_str(), entry.size() + 1); or envp_[index] = static_cast<char*>( calloc((entry.size() + 1) * sizeof(char))); memcpy(envp_[index], entry.c_str(), entry.size()); - Till ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19162/#review37316 ----------------------------------------------------------- On March 14, 2014, 4:45 p.m., Dominic Hamon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19162/ > ----------------------------------------------------------- > > (Updated March 14, 2014, 4:45 p.m.) > > > Review request for mesos, Benjamin Hindman and Ben Mahler. > > > Repository: mesos-git > > > Description > ------- > > See summary > > > Diffs > ----- > > 3rdparty/libprocess/Makefile.am 3c6219eb6e76306463b3710ab7e50ec8b75d3d76 > 3rdparty/libprocess/include/process/subprocess.hpp > d16cbc1e3d464e1784f116ccdb327cf0784f07c2 > 3rdparty/libprocess/src/subprocess.cpp PRE-CREATION > 3rdparty/libprocess/src/tests/subprocess_tests.cpp > d15d4d159105474117c4ea432b215431209ab539 > > Diff: https://reviews.apache.org/r/19162/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Dominic Hamon > >
