Function ocf::TStorageDocument::GetProperty, implemented in "source/ocf/stgdoc.cpp" (line 744), does not take character size into account when copying the result to the given text buffer, and hence fails for wide strings (Unicode build mode).
Bugs: #571 Feature Requests: #242
Here is a proposed fix, mirroring the code for TFileDocument::GetProperty:
- memcpy(dest, buf, textlen); + memcpy(dest, buf, textlen*sizeof(tchar));
See also "TFileDocument::GetProperty (StorageSize): Buffer overflow" [bugs:#573].
Bugs: #573
Log in to post a comment.
Here is a proposed fix, mirroring the code for TFileDocument::GetProperty:
See also "TFileDocument::GetProperty (StorageSize): Buffer overflow" [bugs:#573].
Related
Bugs: #573