[sql] Prevent nChildren overrun decoding interior pages in recover.c.
commitd6343499a94aa3033c5d51730d87c14050bc528e
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 26 Jun 2014 17:58:24 +0000 (26 17:58 +0000)
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 26 Jun 2014 17:58:24 +0000 (26 17:58 +0000)
treefa0a4b618e3dbf656567d8a8bbb46a2016f96e14
parentf5eaeb2fa0597da22b19931edabc2af5cf853e59
[sql] Prevent nChildren overrun decoding interior pages in recover.c.

A corrupt header could result in attempting to read cells past the end
of the page.  Prevent this by capping nChildren based on the amount of
overhead cells require.

BUG=387868

Review URL: https://codereview.chromium.org/343423004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280047 0039d316-1c4b-4281-b951-d872f2087c98
third_party/sqlite/amalgamation/sqlite3.c
third_party/sqlite/src/src/recover.c