Commit f4ffcae8 authored by Ilya Lavrenov's avatar Ilya Lavrenov Committed by Alexander Smorkalov

initialize padding of CvString with zeros

(cherry picked from commit 7b1eb3af)
parent 0422054a
...@@ -346,6 +346,7 @@ CV_IMPL CvString ...@@ -346,6 +346,7 @@ CV_IMPL CvString
cvMemStorageAllocString( CvMemStorage* storage, const char* ptr, int len ) cvMemStorageAllocString( CvMemStorage* storage, const char* ptr, int len )
{ {
CvString str; CvString str;
memset(&str, 0, sizeof(CvString));
str.len = len >= 0 ? len : (int)strlen(ptr); str.len = len >= 0 ? len : (int)strlen(ptr);
str.ptr = (char*)cvMemStorageAlloc( storage, str.len + 1 ); str.ptr = (char*)cvMemStorageAlloc( storage, str.len + 1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment