Merge pull request #1491 from Exiv2/fix_1486_effort2

fix_1486_effort2
This commit is contained in:
Robin Mills 2021-03-12 13:59:53 +00:00 committed by GitHub
commit 6fad24cd11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,7 +411,7 @@ namespace Exiv2 {
{
value_ = buf;
// ensure count>0 and nul terminated # https://github.com/Exiv2/exiv2/issues/1484
if (value_.size() == 0 || (value_.size() > 0 && value_[value_.size()-1] != '\0')) value_ += '\0';
if (value_.size() == 0 || value_[value_.size()-1] != '\0') value_ += '\0';
return 0;
}