[Ocipl-commits] SF.net SVN: ocipl: [48] trunk/ocipl/ocipl.h
Brought to you by:
martinfuchs
|
From: <mar...@us...> - 2008-05-30 08:24:38
|
Revision: 48
http://ocipl.svn.sourceforge.net/ocipl/?rev=48&view=rev
Author: martinfuchs
Date: 2008-05-30 01:24:46 -0700 (Fri, 30 May 2008)
Log Message:
-----------
zero-terminate SqlString buffer after resizing
Modified Paths:
--------------
trunk/ocipl/ocipl.h
Modified: trunk/ocipl/ocipl.h
===================================================================
--- trunk/ocipl/ocipl.h 2008-02-09 15:04:39 UTC (rev 47)
+++ trunk/ocipl/ocipl.h 2008-05-30 08:24:46 UTC (rev 48)
@@ -1091,7 +1091,7 @@
size_t blen() const {return _blen;}
size_t alen() const {return _blen + 1;}
- void resize(size_t l) {_blen = l; _str = (TCHAR*)realloc(_str, (l+1)*sizeof(TCHAR));}
+ void resize(size_t l) {_blen = l; _str = (TCHAR*)realloc(_str, (l+1)*sizeof(TCHAR)); _str[l] = '\0';}
void clear() {*_str = '\0'; _ind.clear();}
TCHAR* str() {return _str;} // Note: _ind is not checked by this function.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|