Fix OOB read in DNS resolver am: 43264bc365
am: c5ea7569a8
am: 2c2546b158
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/12329970 Change-Id: I5e167b6717d7f90ba782e26ef553fb6d302b493a
This commit is contained in:
commit
cf6b3ecd4d
1 changed files with 3 additions and 1 deletions
|
@ -948,6 +948,8 @@ send_vc(res_state statp, struct __res_params* params,
|
|||
else
|
||||
break;
|
||||
}
|
||||
// return size should never exceed container size
|
||||
resplen = anssiz;
|
||||
}
|
||||
/*
|
||||
* If the calling applicating has bailed out of
|
||||
|
@ -960,7 +962,7 @@ send_vc(res_state statp, struct __res_params* params,
|
|||
DprintQ((statp->options & RES_DEBUG) ||
|
||||
(statp->pfcode & RES_PRF_REPLY),
|
||||
(stdout, ";; old answer (unexpected):\n"),
|
||||
ans, (resplen > anssiz) ? anssiz: resplen);
|
||||
ans, resplen);
|
||||
goto read_len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue