Merge branch 'master' into pixelshift
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -445,11 +445,16 @@ public:
|
||||
UserCommentInterpreter () {}
|
||||
virtual std::string toString (Tag* t)
|
||||
{
|
||||
char *buffer = new char[t->getCount()];
|
||||
int count = t->getCount();
|
||||
if(count <= 8) {
|
||||
return std::string();
|
||||
}
|
||||
count = std::min(count, 65535); // limit to 65535 chars to avoid crashes in case of corrupted metadata
|
||||
char *buffer = new char[count - 7];
|
||||
|
||||
if (!strncmp((char*)t->getValue(), "ASCII\0\0\0", 8)) {
|
||||
strncpy (buffer, (char*)t->getValue() + 8, t->getCount() - 8);
|
||||
buffer[t->getCount() - 8] = '\0';
|
||||
if (!memcmp((char*)t->getValue(), "ASCII\0\0\0", 8)) {
|
||||
strncpy (buffer, (char*)t->getValue() + 8, count - 8);
|
||||
buffer[count - 8] = '\0';
|
||||
} else {
|
||||
buffer[0] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user