- 25 Mar, 2020 1 commit
-
-
Ondřej Surý authored
These are mostly false positives, the clang-analyzer FAQ[1] specifies why and how to fix it: > The reason the analyzer often thinks that a pointer can be null is > because the preceding code checked compared it against null. So if you > are absolutely sure that it cannot be null, remove the preceding check > and, preferably, add an assertion as well. The 4 warnings reported are: dnssec-cds.c:781:4: warning: Access to field 'base' results in a dereference of a null pointer (loaded from variable 'buf') isc_buffer_availableregion(buf, &r); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:996:36: note: expanded from macro 'isc_buffer_availableregion' ^ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:821:16: note: expanded from macro 'ISC__BUFFER_AVAILABLEREGION' (_r)->base = isc_buffer_used(_b); \ ^~~~~~~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:152:29: note: expanded from macro 'isc_buffer_used' ((void *)((unsigned char *)(b)->base + (b)->used)) /*d*/ ^~~~~~~~~ 1 warning generated. -- byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view') RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname, ^~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK' ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK' ((void)(ISC_LIKELY(cond) || \ ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY' ^ 1 warning generated. -- ./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host') if (*host == '/') { ^~~~~ 1 warning generated. -- ./main.c:1254:9: warning: Access to field 'sctx' results in a dereference of a null pointer (loaded from variable 'named_g_server') sctx = named_g_server->sctx; ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. References: 1. https://clang-analyzer.llvm.org/faq.html#null_pointer
-
- 21 Feb, 2020 1 commit
-
-
Evan Hunt authored
-
- 14 Feb, 2020 1 commit
-
-
Ondřej Surý authored
-
- 13 Feb, 2020 2 commits
-
-
Evan Hunt authored
-
Ondřej Surý authored
The command used to reformat the files in this commit was: ./util/run-clang-tidy \ -clang-tidy-binary clang-tidy-11 -clang-apply-replacements-binary clang-apply-replacements-11 \ -checks=-*,readability-braces-around-statements \ -j 9 \ -fix \ -format \ -style=file \ -quiet clang-format -i --style=format $(git ls-files '*.c' '*.h') uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h') clang-format -i --style=format $(git ls-files '*.c' '*.h')
-
- 12 Feb, 2020 1 commit
-
-
Ondřej Surý authored
-
- 10 Feb, 2020 1 commit
-
-
Ondřej Surý authored
Also disable the semantic patch as the code needs tweaks here and there because some destroy functions might not destroy the object and return early if the object is still in use.
-
- 03 Feb, 2020 1 commit
-
-
Ondřej Surý authored
The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY. This commit removes all the checks on the return code using the semantic patch from previous commit, as isc_buffer_allocate() now returns void.
-
- 26 Nov, 2019 1 commit
-
-
Mark Andrews authored
The indentation for dumping the master zone was driven by two global variables dns_master_indent and dns_master_indentstr. In threaded mode, this becomes prone to data access races, so this commit converts the global variables into a local per-context tuple that consist of count and string.
-
- 12 Sep, 2019 1 commit
-
-
Ondřej Surý authored
-
- 23 Jul, 2019 1 commit
-
-
Ondřej Surý authored
-
- 09 May, 2019 2 commits
-
-
Tony Finch authored
This makes the `-12a` options to `dnssec-dsfromkey` work more like `dnssec-cds`, in that you can specify more than one digest and you will get multiple records. (Previously you could only get one non-default digest type at a time.) The default is now `-2`. You can get the old behaviour with `-12`. Tests and tools that use `dnssec-dsfromkey` have been updated to use `-12` where necessary. This is for conformance with the DS/CDS algorithm requirements in https://tools.ietf.org/html/draft-ietf-dnsop-algorithm-update
-
Tony Finch authored
-
- 08 Mar, 2019 2 commits
-
-
Ondřej Surý authored
-
Tony Finch authored
Use them in structs for various rdata types where they are missing. This doesn't change the structs since we are replacing explicit uint8_t field types with aliases for uint8_t. Use dns_dsdigest_t in library function arguments. Improve dnssec-cds with these more specific types.
-
- 06 Feb, 2019 1 commit
-
-
Tony Finch authored
Relax an assertion in lib/dns/ds.c so that dnssec-cds does not have to work around it. This will also be useful for dnssec-dsfromkey.
-
- 11 Dec, 2018 1 commit
-
-
Ondřej Surý authored
-
- 08 Nov, 2018 1 commit
-
-
Ondřej Surý authored
-
- 28 Aug, 2018 1 commit
-
-
Ondřej Surý authored
-
- 08 Aug, 2018 2 commits
-
-
Ondřej Surý authored
-
Ondřej Surý authored
-
- 19 Jul, 2018 1 commit
-
-
Ondřej Surý authored
-
- 05 Jun, 2018 1 commit
-
-
Ondřej Surý authored
-
- 22 May, 2018 1 commit
-
-
Ondřej Surý authored
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd HAVE_OPENSSL/HAVE_PKCS11 - Don't enforce the crypto provider from platform.h, just from dst_api.c and configure scripts
-
- 16 May, 2018 1 commit
-
-
Ondřej Surý authored
The three functions has been modeled after the arc4random family of functions, and they will always return random bytes. The isc_random family of functions internally use these CSPRNG (if available): 1. getrandom() libc call (might be available on Linux and Solaris) 2. SYS_getrandom syscall (might be available on Linux, detected at runtime) 3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X) 4. crypto library function: 4a. RAND_bytes in case OpenSSL 4b. pkcs_C_GenerateRandom() in case PKCS#11 library
-
- 09 Apr, 2018 1 commit
-
-
Michał Kępień authored
Replace dns_fixedname_init() calls followed by dns_fixedname_name() calls with calls to dns_fixedname_initname() where it is possible without affecting current behavior and/or performance. This patch was mostly prepared using Coccinelle and the following semantic patch: @@ expression fixedname, name; @@ - dns_fixedname_init(&fixedname); ... - name = dns_fixedname_name(&fixedname); + name = dns_fixedname_initname(&fixedname); The resulting set of changes was then manually reviewed to exclude false positives and apply minor tweaks. It is likely that more occurrences of this pattern can be refactored in an identical way. This commit only takes care of the low-hanging fruit.
-
- 06 Apr, 2018 4 commits
-
-
Witold Krecicki authored
libdns refactoring: get rid of multiple versions of dns_xfrin_create, dst_key_generate, dst_lib_init and dst_context_create
-
Witold Krecicki authored
libdns refactoring: get rid of multiple versions of dns_dnssec_findmatchingkeys and dns_dnssec_findzonekeys
-
Witold Krecicki authored
libdns refactoring: get rid of multiple versions of dns_master_loadfile, dns_master_loadfileinc, dns_master_dump, dns_master_dumpinc, dns_master_dumptostream, dns_master_stylecreate
-
Witold Krecicki authored
-
- 04 Apr, 2018 1 commit
-
-
Ondřej Surý authored
-
- 23 Feb, 2018 1 commit
-
-
Ondřej Surý authored
-
- 31 Jan, 2018 2 commits
-
-
Tinderbox User authored
-
Evan Hunt authored
4883. [cleanup] Improved debugging output from dnssec-cds. [RT #47026] Patch submitted by Tony Finch (dot@dotat.at)
-
- 09 Oct, 2017 1 commit
-
-
Mark Andrews authored
4765. [bug] Address potential INSIST in dnssec-cds. [RT #46150]
-
- 05 Oct, 2017 2 commits