mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 02:25:35 -04:00
check isc_buffer_allocate result
This commit is contained in:
parent
13d451f810
commit
f921bb1806
1 changed files with 3 additions and 1 deletions
|
|
@ -113,6 +113,7 @@ main(int argc, char *argv[]) {
|
|||
isc_boolean_t need_close = ISC_FALSE;
|
||||
isc_boolean_t tcp = ISC_FALSE;
|
||||
isc_boolean_t rawdata = ISC_FALSE;
|
||||
isc_result_t result;
|
||||
isc_uint8_t c;
|
||||
FILE *f;
|
||||
int ch;
|
||||
|
|
@ -184,7 +185,8 @@ main(int argc, char *argv[]) {
|
|||
} else
|
||||
f = stdin;
|
||||
|
||||
isc_buffer_allocate(mctx, &input, 64 * 1024);
|
||||
result = isc_buffer_allocate(mctx, &input, 64 * 1024);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
if (rawdata) {
|
||||
while (fread(&c, 1, 1, f) != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue