server.c:14721:35: error: dereference of NULL ‘text’ [CWE-476] [-Werror=analyzer-null-dereference]
14721 | if (isc_buffer_usedlength(*text) > 0) {
../../lib/isc/include/isc/buffer.h:160:41: note: in definition of macro ‘isc_buffer_usedlength’
160 | #define isc_buffer_usedlength(b) ((b)->used) /* d-a */
| ^
‘named_server_showzone’: event 1
|
|server.c:14633:1:
|14633 | named_server_showzone(named_server_t *server, isc_lex_t *lex,
| | ^~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘named_server_showzone’
|
‘named_server_showzone’: event 2
|
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^
| | |
| | (2) calling ‘zone_from_args’ from ‘named_server_showzone’
server.c:191:27: note: in definition of macro ‘CHECK’
| 191 | result = (op); \
| | ^~
|
+--> ‘zone_from_args’: event 3
|
|10671 | zone_from_args(named_server_t *server, isc_lex_t *lex, const char *zonetxt,
| | ^~~~~~~~~~~~~~
| | |
| | (3) entry to ‘zone_from_args’
|
‘zone_from_args’: event 4
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (4) following ‘true’ branch...
server.c:10686:9: note: in expansion of macro ‘REQUIRE’
|10686 | REQUIRE(zonep != NULL && *zonep == NULL);
| | ^~~~~~~
|
‘zone_from_args’: events 5-8
|
|10688 | if (skip) {
| | ^~ ~
| | | |
| | | (6) following ‘true’ branch (when ‘skip != 0’)...
| | (5) ...to here
|10689 | /* Skip the command name. */
|10690 | ptr = next_token(lex, text);
| | ~~~ ~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (8) calling ‘next_token’ from ‘zone_from_args’
| | (7) ...to here
|
+--> ‘next_token’: events 9-11
|
|10619 | next_token(isc_lex_t *lex, isc_buffer_t **text) {
| | ^~~~~~~~~~
| | |
| | (9) entry to ‘next_token’
|......
|10639 | (void)putnull(text);
| | ~~~~~~~~~~~~~
| | |
| | (11) ...to here
|......
|10643 | if (text != NULL) {
| | ~
| | |
| | (10) following ‘false’ branch (when ‘text’ is NULL)...
|
<------+
|
‘zone_from_args’: events 12-13
|
|10690 | ptr = next_token(lex, text);
| | ^~~~~~~~~~~~~~~~~~~~~
| | |
| | (12) returning to ‘zone_from_args’ from ‘next_token’
|10691 | if (ptr == NULL) {
| | ~
| | |
| | (13) following ‘true’ branch (when ‘ptr’ is NULL)...
|
‘zone_from_args’: event 14
|
|cc1:
| (14): ...to here
|
<------+
|
‘named_server_showzone’: event 15
|
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^
| | |
| | (15) returning to ‘named_server_showzone’ from ‘zone_from_args’
server.c:191:27: note: in definition of macro ‘CHECK’
| 191 | result = (op); \
| | ^~
|
‘named_server_showzone’: event 16
|
| 192 | if (result != ISC_R_SUCCESS) \
| | ^
| | |
| | (16) following ‘true’ branch (when ‘result != 0’)...
server.c:14649:9: note: in expansion of macro ‘CHECK’
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^~~~~
|
‘named_server_showzone’: event 17
|
| 193 | goto cleanup; \
| | ^~~~
| | |
| | (17) ...to here
server.c:14649:9: note: in expansion of macro ‘CHECK’
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^~~~~
|
‘named_server_showzone’: events 18-19
|
|14717 | if (nzconfig != NULL) {
| | ^
| | |
| | (18) following ‘false’ branch...
|......
|14721 | if (isc_buffer_usedlength(*text) > 0) {
| | ~~
| | |
| | (19) ...to here
|
‘named_server_showzone’: event 20
|
|14721 | if (isc_buffer_usedlength(*text) > 0) {
../../lib/isc/include/isc/buffer.h:160:41: note: in definition of macro ‘isc_buffer_usedlength’
| 160 | #define isc_buffer_usedlength(b) ((b)->used) /* d-a */
| | ^
|