From 7fe11c51cfb050dafef1cf875dc4eb4e65352465 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 16 Mar 2015 19:38:43 +0700 Subject: Several bug fixes and silencing requests. --- src/base/wlc/wlcReadSmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/base/wlc/wlcReadSmt.c') diff --git a/src/base/wlc/wlcReadSmt.c b/src/base/wlc/wlcReadSmt.c index 8143be6c..dcf018b7 100644 --- a/src/base/wlc/wlcReadSmt.c +++ b/src/base/wlc/wlcReadSmt.c @@ -706,12 +706,12 @@ static inline char * Smt_PrsLoadFile( char * pFileName, char ** ppLimit ) // move the file current reading position to the beginning rewind( pFile ); // load the contents of the file into memory - pBuffer = ABC_ALLOC( char, nFileSize + 3 ); + pBuffer = ABC_ALLOC( char, nFileSize + 16 ); pBuffer[0] = '\n'; RetValue = fread( pBuffer+1, nFileSize, 1, pFile ); // terminate the string with '\0' - pBuffer[nFileSize + 0] = '\n'; - pBuffer[nFileSize + 1] = '\0'; + pBuffer[nFileSize + 1] = '\n'; + pBuffer[nFileSize + 2] = '\0'; *ppLimit = pBuffer + nFileSize + 2; return pBuffer; } -- cgit v1.2.3