New Coverity Warnings
Hi,
Please find the latest report on new defect(s) introduced to BIND found with Coverity Scan.
3 new defect(s) introduced to BIND found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1434969: (UNINIT)
________________________________________________________________________________________________________
*** CID 1434969: (UNINIT)
/bin/tools/mdig.c: 1033 in plus_option()
1027 isc_result_t result;
1028 char *cmd, *value, *last, *code;
1029 isc_uint32_t num;
1030 isc_boolean_t state = ISC_TRUE;
1031 size_t n;
1032
>>> CID 1434969: (UNINIT)
>>> Using uninitialized value "last" when calling "__strtok_r_1c".
1033 if ((cmd = strtok_r(option, "=", &last)) == NULL) {
1034 printf(";; Invalid option %s\n", option);
1035 return;
1036 }
1037 if (strncasecmp(cmd, "no", 2) == 0) {
1038 cmd += 2;
/bin/delv/delv.c: 968 in plus_option()
962 static void
963 plus_option(char *option) {
964 isc_result_t result;
965 char *cmd, *value, *last;
966 isc_boolean_t state = ISC_TRUE;
967
>>> CID 1434969: (UNINIT)
>>> Using uninitialized value "last" when calling "__strtok_r_1c".
968 cmd = strtok_r(option, "=", &last);
969 if (cmd == NULL) {
970 printf(";; Invalid option %s\n", option);
971 return;
972 }
973 if (strncasecmp(cmd, "no", 2)==0) {
/bin/dig/dig.c: 741 in plus_option()
735 isc_result_t result;
736 char *cmd, *value, *last, *code, *extra;
737 isc_uint32_t num;
738 isc_boolean_t state = ISC_TRUE;
739 size_t n;
740
>>> CID 1434969: (UNINIT)
>>> Using uninitialized value "last" when calling "__strtok_r_1c".
741 if ((cmd = strtok_r(option, "=", &last)) == NULL) {
742 printf(";; Invalid option %s\n", option);
743 return;
744 }
745 if (strncasecmp(cmd, "no", 2)==0) {
746 cmd += 2;
** CID 1434968: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1434968: Null pointer dereferences (FORWARD_NULL)
/bin/named/statschannel.c: 3126 in render_xsl()
3120 isc_time_t when;
3121 char *line, *saveptr;
3122 const char *if_modified_since = "If-Modified-Since: ";
3123 _headers = strdup(headers);
3124
3125 saveptr = NULL;
>>> CID 1434968: Null pointer dereferences (FORWARD_NULL)
>>> Passing "&saveptr" to "__strtok_r_1c", which dereferences null "saveptr".
3126 for (line = strtok_r(_headers, "\n", &saveptr);
3127 line;
3128 line = strtok_r(NULL, "\n", &saveptr)) {
3129 if (strncasecmp(line, if_modified_since,
3130 strlen(if_modified_since)) == 0) {
3131 time_t t1, t2;
** CID 1434967: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1434967: Null pointer dereferences (FORWARD_NULL)
/lib/irs/getaddrinfo.c: 1074 in set_order()
1068 break;
1069 }
1070 } else {
1071 order = getenv("NET_ORDER");
1072 found = 0;
1073 last = NULL;
>>> CID 1434967: Null pointer dereferences (FORWARD_NULL)
>>> Passing "&last" to "__strtok_r_1c", which dereferences null "last".
1074 for (tok = strtok_r(order, ":", &last);
1075 tok;
1076 tok = strtok_r(NULL, ":", &last))
1077 {
1078 if (strcasecmp(tok, "inet6") == 0) {
1079 if ((found & FOUND_IPV6) == 0) {
Edited by Evan Hunt