Bug 1565515 - DecodeBinary violates contract for 0-sized binary r=asuth,ttung

Differential Revision: https://phabricator.services.mozilla.com/D37849

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2019-07-26 14:00:07 +00:00
parent 94fda141b7
commit 4546172f59

View File

@ -755,6 +755,7 @@ JSObject* Key::DecodeBinary(const unsigned char*& aPos,
}
if (!size) {
++aPos;
return JS::NewArrayBuffer(aCx, 0);
}