Add bounds check in get_ptr.
authorNick Terrell <terrelln@fb.com>
Tue, 21 Jul 2015 18:34:55 +0000 (11:34 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Tue, 21 Jul 2015 23:52:50 +0000 (16:52 -0700)
commitc636ccbe85cd086426dceb645dca71e7dc1d7efd
tree88c755873220fbe4279bc40d627fa60cbf2be255
parent031ed38a57114bca7a72dd61a29ad84feaab60ed
Add bounds check in get_ptr.

Summary: `get_ptr()` checks if the index is past the end of the array, but it
doesn't check if it is less than 0, while `at()` does.

Reviewed By: @yfeldblum

Differential Revision: D2258548
folly/dynamic.cpp
folly/test/DynamicTest.cpp