QMimeMagicRule: fix inconsequential out-of-bounds access
The penultimate entry in mimeRuleTypes_strings is "byte", which, incl. the terminating NUL character, has length five. But 65-59 == 6, so the last index in magicRuleType_indices was off by one. No harm done, since there's one more NUL (three in total...), but fix for the next reader of the code. Change-Id: Ibdf855014a313a0486d013c9d06d55cea96435fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
648840c617
commit
7200572b39
|
|
@ -65,7 +65,7 @@ static const char magicRuleTypes_string[] =
|
|||
"\0";
|
||||
|
||||
static const int magicRuleTypes_indices[] = {
|
||||
0, 8, 15, 22, 29, 35, 41, 50, 59, 65, 0
|
||||
0, 8, 15, 22, 29, 35, 41, 50, 59, 64, 0
|
||||
};
|
||||
|
||||
QMimeMagicRule::Type QMimeMagicRule::type(const QByteArray &theTypeName)
|
||||
|
|
|
|||
Loading…
Reference in New Issue