Fix buffer overflow.

This commit is contained in:
Frederich Munch 2017-06-09 02:09:05 -04:00 committed by sftnight
parent 333fd017dc
commit f84742e218

View File

@ -675,7 +675,7 @@ namespace cling {
source_name.str()));
char* MBStart = const_cast<char*>(MB->getBufferStart());
memcpy(MBStart, input.data(), InputSize);
memcpy(MBStart + InputSize, "\n", 2);
MBStart[InputSize] = '\n';
SourceManager& SM = getCI()->getSourceManager();