Currently no checking is done to make sure the passed buffer is large enough for the passed sizes or that the pixelStore params are valid for the passed data. Also need to validate the type, format and internal format for the passed buffer type.
This was necessarily fixed as part of https://bugs.webkit.org/show_bug.cgi?id=40398 . Closing as a duplicate.
*** This bug has been marked as a duplicate of bug 40398 ***