bind9/bin/dig
Mark Andrews e7ef0a60ab Prevent overflow of size
If size overflows we will have an infinite loop.  In practice
this will not happen unless we have made a coding error.  Add
an INSIST to detect this condition.

    181        while (!done) {
    182                isc_buffer_allocate(mctx, &b, size);
    183                result = dns_rdata_totext(rdata, NULL, b);
    184                if (result == ISC_R_SUCCESS) {
    185                        printf("%.*s\n", (int)isc_buffer_usedlength(b),
    186                               (char *)isc_buffer_base(b));
    187                        done = true;
    188                } else if (result != ISC_R_NOSPACE) {
    189                        check_result(result, "dns_rdata_totext");
    190                }
    191                isc_buffer_free(&b);

    CID 498025: (#1 of 1): Overflowed constant (INTEGER_OVERFLOW)
    overflow_const: Expression size, which is equal to 0, overflows the type that
    receives it, an unsigned integer 32 bits wide.
    192                size *= 2;
    193        }
2024-08-03 03:39:26 +00:00
..
.gitignore [master] update gitignore files; use rev-parse to get srcid 2014-06-17 13:49:30 -07:00
dig.c Re-enable EDNS if an EDNS flag gets set to 1 by +ednsflags 2024-03-16 16:07:55 +11:00
dig.rst remove some long-deprecated arguments from dig 2023-12-06 17:32:09 -08:00
dighost.c Remove isc__tls_setfatalmode() function and the calls 2024-02-08 08:01:58 +01:00
dighost.h NetBSD has added 'hmac' to libc so rename out uses of hmac 2023-12-13 22:27:38 +00:00
host.c Use EXIT_SUCCESS and EXIT_FAILURE 2024-02-08 08:01:58 +01:00
host.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 10:46:36 +01:00
Makefile.am Move irs_resconf into libdns and remove libirs 2023-02-24 09:38:59 +00:00
nslookup.c Prevent overflow of size 2024-08-03 03:39:26 +00:00
nslookup.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 10:46:36 +01:00
readline.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00