mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
branches/zip: page_validate(): Check the buf[] bounds.
This commit is contained in:
parent
0dd60c1d3a
commit
3e06875130
1 changed files with 12 additions and 2 deletions
|
@ -2414,8 +2414,13 @@ page_validate(
|
|||
}
|
||||
|
||||
offs = page_offset(rec_get_start(rec, offsets));
|
||||
i = rec_offs_size(offsets);
|
||||
if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) {
|
||||
fputs("InnoDB: record offset out of bounds\n", stderr);
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
for (i = rec_offs_size(offsets); i--; ) {
|
||||
while (i--) {
|
||||
if (UNIV_UNLIKELY(buf[offs + i])) {
|
||||
/* No other record may overlap this */
|
||||
|
||||
|
@ -2523,8 +2528,13 @@ n_owned_zero:
|
|||
|
||||
count++;
|
||||
offs = page_offset(rec_get_start(rec, offsets));
|
||||
i = rec_offs_size(offsets);
|
||||
if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) {
|
||||
fputs("InnoDB: record offset out of bounds\n", stderr);
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
for (i = rec_offs_size(offsets); i--; ) {
|
||||
while (i--) {
|
||||
|
||||
if (UNIV_UNLIKELY(buf[offs + i])) {
|
||||
fputs("InnoDB: Record overlaps another"
|
||||
|
|
Loading…
Reference in a new issue