mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 06:10:02 +08:00
initialize padding of CvString with zeros
(cherry picked from commit 7b1eb3af7b
)
This commit is contained in:
parent
0422054aa1
commit
f4ffcae8d9
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user