From: Mathias Panzenböck Date: Thu, 23 Jun 2011 23:53:20 +0000 (+0200) Subject: IT: the max. 8000 bytes msg. length have to include the NUL X-Git-Tag: v1.8beta~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7fd4cd2fcf15df3848cc6fa610655b4759104d3;p=taglib IT: the max. 8000 bytes msg. length have to include the NUL --- diff --git a/taglib/it/itfile.cpp b/taglib/it/itfile.cpp index 183a4f00..3b2ca876 100644 --- a/taglib/it/itfile.cpp +++ b/taglib/it/itfile.cpp @@ -134,9 +134,9 @@ bool IT::File::save() // it's actually not really stated if the message needs a // terminating NUL but it does not hurt to add one: + if(message.size() > 7999) + message.resize(7999); message.append((char)0); - if(message.size() > 8000) - message.resize(8000); ushort special = 0; ushort messageLength = 0;