Fix dynamic prop name handling in unserilizer fast path.
commit2e71d439db405c551fa95d289ef1671620e84d37
authorAlexey Toptygin <alexeyt@fb.com>
Fri, 13 Jul 2018 15:53:19 +0000 (13 08:53 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 13 Jul 2018 15:57:19 +0000 (13 08:57 -0700)
treef84b3a73a5bc4023df669db8480b48c7993f2009
parent93c31ec66fdd74eb691b6e400de7ffc465d14a5d
Fix dynamic prop name handling in unserilizer fast path.

Summary: We were missing the checks for empty/malformed property names if we unserialized dynamic properties in the unserializer fast path. Fix it, add tests.

Reviewed By: markw65

Differential Revision: D8828761

fbshipit-source-id: 2dea288a5dacad3ea86cf5c4323ca2f53675d749
17 files changed:
hphp/runtime/base/variable-unserializer.cpp
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-empty.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-malformed.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-malformed.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-private-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-private-empty.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-protected-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/fast-protected-empty.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-empty.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-malformed.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-malformed.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-private-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-private-empty.php.expectf [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-protected-empty.php [new file with mode: 0644]
hphp/test/slow/unserialize-invalid-dynamic-prop-name/slow-protected-empty.php.expectf [new file with mode: 0644]