Port r183666 to identify_magic.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 17:25:45 +0000 (17:25 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 17:25:45 +0000 (17:25 +0000)
commit0179706213212cd35f43365ad912558ebe0e84b0
treee7e6c25aadd61692b9f542ec668bd756dbb19261
parent9bd9f8e839de7e85f02a20f01fe4d0c129147f46
Port r183666 to identify_magic.

It will be tested in the next commit which moves another user to identify_magic.

Original message:

Fix an out of bounds array access.

We were looking at Magic[5] without checking Length. Since this path would not
return unless Length >= 18 anyway, just move the >= 18 check up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183753 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/PathV2.cpp