1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

initialize padding of CvString with zeros

This commit is contained in:
Ilya Lavrenov
2015-09-03 17:21:04 +03:00
parent a98ee0d3b2
commit 7b1eb3af7b
+1
View File
@@ -346,6 +346,7 @@ CV_IMPL CvString
cvMemStorageAllocString( CvMemStorage* storage, const char* ptr, int len )
{
CvString str;
memset(&str, 0, sizeof(CvString));
str.len = len >= 0 ? len : (int)strlen(ptr);
str.ptr = (char*)cvMemStorageAlloc( storage, str.len + 1 );