Fix OpenSubdiv related buffer overrun with multiple FVar channels.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sat, 10 Sep 2016 18:15:52 +0000 (21:15 +0300)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 14 Sep 2016 08:26:20 +0000 (10:26 +0200)
commitf6fb072ab241fb490c98ef56c1215f593677db06
tree05668af782d51ab5a456eec7338ab5c889f5a1e3
parent16135990cd92a4042413a06f8c65948540b7d598
Fix OpenSubdiv related buffer overrun with multiple FVar channels.

The existing code uses the input value count of the first channel
for all of them. If the first channel is the largest, it leads to
a crash-causing buffer overrun in memcpy below. Likely this was
left since the time when only one channel was supported.

As a crash fix, probably should go into 2.78
intern/opensubdiv/opensubdiv_capi.cc