Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-user



Hi,


Please find the latest report on new defect(s) introduced to NetBSD found with 
Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 20 of 30 defect(s)


** CID 980032:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
/sys/opencrypto/ocryptodev.c: 226 in ocryptodev_mop()

** CID 1042685:  Unchecked return value from library  (CHECKED_RETURN)
/external/bsd/wpa/dist/hostapd/ctrl_iface.c: 1253 in 
hostapd_global_ctrl_iface_receive()

** CID 1042681:  Logically dead code  (DEADCODE)
/external/bsd/wpa/dist/src/ap/ieee802_11_shared.c: 226 in 
hostapd_eid_ext_capab()

** CID 1153962:  Logically dead code  (DEADCODE)
/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c: 1249 in 
wpas_build_ext_capab()

** CID 980295:  Dead default in switch  (DEADCODE)
/sys/opencrypto/cryptosoft.c: 566 in swcr_authcompute()

** CID 1153963:  Dereference after null check  (FORWARD_NULL)
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()

** CID 1153964:  Missing break in switch  (MISSING_BREAK)
/external/bsd/dhcpcd/dist/if-options.c: 1089 in parse_option()

** CID 1153965:  Missing break in switch  (MISSING_BREAK)
/external/bsd/mdocml/dist/mdoc_macro.c: 717 in blk_exp_close()

** CID 275027:  Dereference before null check  (REVERSE_INULL)
/sys/opencrypto/cryptodev.c: 1487 in cryptodev_mkey()

** CID 980607:  Uninitialized scalar variable  (UNINIT)
/sys/opencrypto/cryptodev.c: 1742 in cryptodev_msession()

** CID 980828:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 982 in ()

** CID 980829:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 985 in ()

** CID 980830:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 988 in ()

** CID 980833:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/ex/ex_usage.c: 130 in ()

** CID 97100:  Negative array index read  (NEGATIVE_RETURNS)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 5301 in trimbletsip_init()

** CID 979810:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4358 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4362 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4458 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4482 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4490 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4498 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4518 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4572 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4600 in gps16x_message()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4604 in gps16x_message()

** CID 979811:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 2695 in l_mktime()

** CID 979812:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3556 in parse_control()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3560 in parse_control()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3584 in parse_control()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3613 in parse_control()
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3662 in parse_control()

** CID 979813:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 2576 in parsestate()

** CID 979814:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 5807 in trimbletsip_message()


________________________________________________________________________________________________________
*** CID 980032:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
/sys/opencrypto/ocryptodev.c: 226 in ocryptodev_mop()
220             cnop.mackey = ocnop->mackey;
221             cnop.src = ocnop->src;
222             cnop.dst = ocnop->dst;
223             cnop.mac = ocnop->mac;
224             cnop.iv = ocnop->iv;
225             cnop.dst_len = 0;
>>>     CID 980032:  Out-of-bounds access  (ARRAY_VS_SINGLETON)
>>>     Taking address with "&cnop" yields a singleton pointer.
226             res = cryptodev_mop(fcr, &cnop, count, l);
227             ocnop->reqid = cnop.reqid;
228             ocnop->status = cnop.status;
229     
230             return res;
231     };

________________________________________________________________________________________________________
*** CID 1042685:  Unchecked return value from library  (CHECKED_RETURN)
/external/bsd/wpa/dist/hostapd/ctrl_iface.c: 1253 in 
hostapd_global_ctrl_iface_receive()
1247     
1248            if (reply_len < 0) {
1249                    os_memcpy(reply, "FAIL\n", 5);
1250                    reply_len = 5;
1251            }
1252     
>>>     CID 1042685:  Unchecked return value from library  (CHECKED_RETURN)
>>>     No check of the return value of "sendto(sock, reply, reply_len, 0, 
>>> (struct sockaddr *)&from, fromlen)".
1253            sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, 
fromlen);
1254     }
1255     
1256     
1257     static char * hostapd_global_ctrl_iface_path(struct hapd_interfaces 
*interface)
1258     {

________________________________________________________________________________________________________
*** CID 1042681:  Logically dead code  (DEADCODE)
/external/bsd/wpa/dist/src/ap/ieee802_11_shared.c: 226 in 
hostapd_eid_ext_capab()
220             if (len < 6)
221                     return pos;
222             *pos = 0x00;
223             pos++;
224     
225             if (len < 7)
>>>     CID 1042681:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "return pos;".
226                     return pos;
227             *pos = 0x00;
228             if (hapd->conf->ssid.utf8_ssid)
229                     *pos |= 0x01; /* Bit 48 - UTF-8 SSID */
230             pos++;
231     

________________________________________________________________________________________________________
*** CID 1153962:  Logically dead code  (DEADCODE)
/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c: 1249 in 
wpas_build_ext_capab()
1243            ext_capab |= BIT(19); /* BSS Transition */
1244     #endif /* CONFIG_WNM */
1245     
1246            if (!ext_capab)
1247                    return 0;
1248     
>>>     CID 1153962:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "*pos++ = 127;".
1249            *pos++ = WLAN_EID_EXT_CAPAB;
1250            *pos++ = 4;
1251            WPA_PUT_LE32(pos, ext_capab);
1252            pos += 4;
1253     
1254            return pos - buf;

________________________________________________________________________________________________________
*** CID 980295:  Dead default in switch  (DEADCODE)
/sys/opencrypto/cryptosoft.c: 566 in swcr_authcompute()
560                     m_copyback((struct mbuf *) buf, crd->crd_inject,
561                         axf->auth_hash->authsize, aalg);
562                     break;
563             case CRYPTO_BUF_IOV:
564                     memcpy(crp->crp_mac, aalg, axf->auth_hash->authsize);
565                     break;
>>>     CID 980295:  Dead default in switch  (DEADCODE)
>>>     Execution cannot reach this statement "default:".
566             default:
567                     return EINVAL;
568             }
569             return 0;
570     }
571     

________________________________________________________________________________________________________
*** CID 1153963:  Dereference after null check  (FORWARD_NULL)
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
1297                                    return -1;
1298                            }
1299                            arg = strskipwhite(fp);
1300                    }
1301                    /* type */
1302                    fp = strwhite(arg);
>>>     CID 1153963:  Dereference after null check  (FORWARD_NULL)
>>>     Comparing "fp" to null implies that "fp" might be null.
1303                    if (fp)
1304                            *fp++ = '\0';
1305                    np = strchr(arg, ':');
1306                    /* length */
1307                    if (np) {
1308                            *np++ = '\0';
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
1297                                    return -1;
1298                            }
1299                            arg = strskipwhite(fp);
1300                    }
1301                    /* type */
1302                    fp = strwhite(arg);
>>>     CID 1153963:  Dereference after null check  (FORWARD_NULL)
>>>     Comparing "fp" to null implies that "fp" might be null.
1303                    if (fp)
1304                            *fp++ = '\0';
1305                    np = strchr(arg, ':');
1306                    /* length */
1307                    if (np) {
1308                            *np++ = '\0';
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
1297                                    return -1;
1298                            }
1299                            arg = strskipwhite(fp);
1300                    }
1301                    /* type */
1302                    fp = strwhite(arg);
>>>     CID 1153963:  Dereference after null check  (FORWARD_NULL)
>>>     Comparing "fp" to null implies that "fp" might be null.
1303                    if (fp)
1304                            *fp++ = '\0';
1305                    np = strchr(arg, ':');
1306                    /* length */
1307                    if (np) {
1308                            *np++ = '\0';
/external/bsd/dhcpcd/dist/if-options.c: 1303 in parse_option()
1297                                    return -1;
1298                            }
1299                            arg = strskipwhite(fp);
1300                    }
1301                    /* type */
1302                    fp = strwhite(arg);
>>>     CID 1153963:  Dereference after null check  (FORWARD_NULL)
>>>     Comparing "fp" to null implies that "fp" might be null.
1303                    if (fp)
1304                            *fp++ = '\0';
1305                    np = strchr(arg, ':');
1306                    /* length */
1307                    if (np) {
1308                            *np++ = '\0';

________________________________________________________________________________________________________
*** CID 1153964:  Missing break in switch  (MISSING_BREAK)
/external/bsd/dhcpcd/dist/if-options.c: 1089 in parse_option()
1083                    break;
1084     #endif
1085            case O_IAID:
1086                    if (parse_iaid(ifo->iaid, arg, sizeof(ifo->iaid)) == -1)
1087                            return -1;
1088                    ifo->options |= DHCPCD_IAID;
>>>     CID 1153964:  Missing break in switch  (MISSING_BREAK)
>>>     The above case falls through to this one.
1089            case O_IPV6RS:
1090                    ifo->options |= DHCPCD_IPV6RS;
1091                    break;
1092            case O_NOIPV6RS:
1093                    ifo->options &= ~DHCPCD_IPV6RS;
1094                    break;

________________________________________________________________________________________________________
*** CID 1153965:  Missing break in switch  (MISSING_BREAK)
/external/bsd/mdocml/dist/mdoc_macro.c: 717 in blk_exp_close()
711             switch (tok) {
712             case (MDOC_Ec):
713                     maxargs = 1;
714                     break;
715             case (MDOC_Ek):
716                     mdoc->flags &= ~MDOC_KEEP;
>>>     CID 1153965:  Missing break in switch  (MISSING_BREAK)
>>>     The above case falls through to this one.
717             default:
718                     maxargs = 0;
719                     break;
720             }
721     
722             /*

________________________________________________________________________________________________________
*** CID 275027:  Dereference before null check  (REVERSE_INULL)
/sys/opencrypto/cryptodev.c: 1487 in cryptodev_mkey()
1481                    if (kop[req].crk_status != 0) {
1482                            goto fail;
1483                    }
1484     
1485     fail:
1486                    if(kop[req].crk_status) {
>>>     CID 275027:  Dereference before null check  (REVERSE_INULL)
>>>     Null-checking "krp" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
1487                            if (krp) {
1488                                    kop[req].crk_status = krp->krp_status;
1489                                    for (i = 0; i < CRK_MAXPARAM; i++) {
1490                                            struct crparam *kp =
1491                                                    &(krp->krp_param[i]);
1492                                            if (kp->crp_p) {

________________________________________________________________________________________________________
*** CID 980607:  Uninitialized scalar variable  (UNINIT)
/sys/opencrypto/cryptodev.c: 1742 in cryptodev_msession()
1736     cryptodev_msession(struct fcrypt *fcr, struct session_n_op *sn_ops,
1737                       int count)
1738     {
1739            int i;
1740     
1741            for (i = 0; i < count; i++, sn_ops++) {
>>>     CID 980607:  Uninitialized scalar variable  (UNINIT)
>>>     Declaring variable "s_op" without initializer.
1742                    struct session_op s_op;
1743                    s_op.cipher =           sn_ops->cipher;
1744                    s_op.mac =              sn_ops->mac;
1745                    s_op.keylen =           sn_ops->keylen;
1746                    s_op.key =              sn_ops->key;
1747                    s_op.mackeylen =        sn_ops->mackeylen;

________________________________________________________________________________________________________
*** CID 980828:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 982 in ()
976             curlen = 0;
977             offset = op - optlist;
978             switch (op->type) {
979             case OPT_0BOOL:
980             case OPT_1BOOL:
981                     curlen += ex_printf(sp,
>>>     CID 980828:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
>>>     argument is incompatible with corresponding format string conversion
982                         "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
983                     break;
984             case OPT_NUM:
985                     curlen += ex_printf(sp, WS"=%ld", op->name, O_VAL(sp, 
offset));
986                     break;
987             case OPT_STR:

________________________________________________________________________________________________________
*** CID 980829:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 985 in ()
979             case OPT_0BOOL:
980             case OPT_1BOOL:
981                     curlen += ex_printf(sp,
982                         "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
983                     break;
984             case OPT_NUM:
>>>     CID 980829:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
>>>     argument is incompatible with corresponding format string conversion
985                     curlen += ex_printf(sp, WS"=%ld", op->name, O_VAL(sp, 
offset));
986                     break;
987             case OPT_STR:
988                     curlen += ex_printf(sp, WS"=\"%s\"", op->name,
989                         O_STR(sp, offset) == NULL ? "" : O_STR(sp, offset));
990                     break;

________________________________________________________________________________________________________
*** CID 980830:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/common/options.c: 988 in ()
982                         "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
983                     break;
984             case OPT_NUM:
985                     curlen += ex_printf(sp, WS"=%ld", op->name, O_VAL(sp, 
offset));
986                     break;
987             case OPT_STR:
>>>     CID 980830:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
>>>     argument is incompatible with corresponding format string conversion
988                     curlen += ex_printf(sp, WS"=\"%s\"", op->name,
989                         O_STR(sp, offset) == NULL ? "" : O_STR(sp, offset));
990                     break;
991             }
992             return (curlen);
993     }

________________________________________________________________________________________________________
*** CID 980833:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
/external/bsd/nvi/dist/ex/ex_usage.c: 130 in ()
124                                     for (name = cp->name + 1,
125                                         p = nb + 4; (*p++ = *name++) != 
'\0';);
126                                     name = nb;
127                             } else
128                                     name = cp->name;
129                             (void)ex_printf(sp,
>>>     CID 980833:  Printf arg type mismatch  (PW.PRINTF_ARG_MISMATCH)
>>>     argument is incompatible with corresponding format string conversion
130                                 WVS": %s\n", MAXCMDNAMELEN, name, cp->help);
131                     }
132                     break;
133             default:
134                     abort();
135             }

________________________________________________________________________________________________________
*** CID 97100:  Negative array index read  (NEGATIVE_RETURNS)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 5301 in trimbletsip_init()
5295            {
5296                    msyslog(LOG_ERR, "PARSE receiver #%d: trimbletsip_init: 
tcgetattr(%d, &tio): %m", CLK_UNIT(parse->peer), parse->generic->io.fd);
5297                    return 0;
5298            }
5299            else
5300            {
>>>     CID 97100:  Negative array index read  (NEGATIVE_RETURNS)
>>>     Using negative constant "-1" as an index to array "parse_clockinfo".
5301                    if ((parse_clockinfo[CLK_TYPE(parse->peer)].cl_lflag & 
ICANON))
5302                    {
5303     #ifdef VEOL
5304                            tio.c_cc[VEOL]  = ETX;
5305     #endif
5306     #ifdef VEOL2

________________________________________________________________________________________________________
*** CID 979810:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4358 in gps16x_message()
4352                                                                    }
4353                                                                    
4354                                                                    p = 
ap(buffer, sizeof(buffer), p, "%s", (const char *)s->string);
4355                                                            }
4356                                                            s++;
4357                                                    }
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4358                                                    p = ap(buffer, 
sizeof(buffer), p, "\"");
4359                                            }
4360                                            else
4361                                            {
4362                                                    p = ap(buffer, 
sizeof(buffer), p, "<OK>\"");
4363                                            }
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4362 in gps16x_message()
4356                                                            s++;
4357                                                    }
4358                                                    p = ap(buffer, 
sizeof(buffer), p, "\"");
4359                                            }
4360                                            else
4361                                            {
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "<OK>\"")" is never used.
4362                                                    p = ap(buffer, 
sizeof(buffer), p, "<OK>\"");
4363                                            }
4364                    
4365                                            set_var(&parse->kv, buffer, 
strlen(buffer)+1, RO|DEF);
4366                                    }
4367                            break;
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4458 in gps16x_message()
4452                                                    p = ap(buffer, 
sizeof(buffer),
4453                                                        p, "bad status 
0x%04x",
4454                                                        antinfo.status);
4455                                                    break;
4456                                            }
4457                                            
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4458                                            p = ap(buffer, sizeof(buffer), 
p, "\"");
4459                                            
4460                                            set_var(&parse->kv, buffer, 
sizeof(buffer), RO|DEF);
4461                                    }
4462                            break;
4463                  
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4482 in gps16x_message()
4476                                                    int i;
4477                                                    
4478                                                    p = buffer;
4479                                                    p = ap(buffer, 
sizeof(buffer),
4480                                                        p, "gps_tot_51=\"");
4481                                                    mbg_tgps_str(&p, 
&cfgh.tot_51, BUFFER_SIZE(buffer, p));
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4482                                                    p = ap(buffer, 
sizeof(buffer),
4483                                                        p, "\"");
4484                                                    set_var(&parse->kv, 
buffer, sizeof(buffer), RO);
4485                                                    
4486                                                    p = buffer;
4487                                                    p = ap(buffer, 
sizeof(buffer),
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4490 in gps16x_message()
4484                                                    set_var(&parse->kv, 
buffer, sizeof(buffer), RO);
4485                                                    
4486                                                    p = buffer;
4487                                                    p = ap(buffer, 
sizeof(buffer),
4488                                                        p, "gps_tot_63=\"");
4489                                                    mbg_tgps_str(&p, 
&cfgh.tot_63, BUFFER_SIZE(buffer, p));
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4490                                                    p = ap(buffer, 
sizeof(buffer),
4491                                                        p, "\"");
4492                                                    set_var(&parse->kv, 
buffer, sizeof(buffer), RO);
4493                                                    
4494                                                    p = buffer;
4495                                                    p = ap(buffer, 
sizeof(buffer),
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4498 in gps16x_message()
4492                                                    set_var(&parse->kv, 
buffer, sizeof(buffer), RO);
4493                                                    
4494                                                    p = buffer;
4495                                                    p = ap(buffer, 
sizeof(buffer),
4496                                                        p, "gps_t0a=\"");
4497                                                    mbg_tgps_str(&p, 
&cfgh.t0a, BUFFER_SIZE(buffer, p));
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4498                                                    p = ap(buffer, 
sizeof(buffer),
4499                                                        p, "\"");
4500                                                    set_var(&parse->kv, 
buffer, sizeof(buffer), RO);
4501                                                    
4502                                                    for (i = MIN_SVNO; i < 
MAX_SVNO; i++)
4503                                                    {
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4518 in gps16x_message()
4512                                                                    p = 
ap(buffer, sizeof(buffer), p, "BLOCK II");
4513                                                                    break;
4514                                                            default:
4515                                                                    p = 
ap(buffer, sizeof(buffer), p, "bad CFG");
4516                                                                    break;
4517                                                            }
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4518                                                            p = ap(buffer, 
sizeof(buffer), p, "\"");
4519                                                            
set_var(&parse->kv, buffer, sizeof(buffer), RO);
4520                                                            
4521                                                            p = buffer;
4522                                                            p = ap(buffer, 
sizeof(buffer), p, "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
4523                                                            switch 
((cfgh.health[i] >> 5) & 0x7 )
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4572 in gps16x_message()
4566                                                                    break;
4567                                                            default:
4568                                                                    p = 
ap(buffer, sizeof(buffer), p, "TRANSMISSION PROBLEMS");
4569                                                                    break;
4570                                                            }
4571                                                            
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4572                                                            p = ap(buffer, 
sizeof(buffer), p, "\"");
4573                                                            
set_var(&parse->kv, buffer, sizeof(buffer), RO);
4574                                                    }
4575                                            }
4576                                    }
4577                            break;
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4600 in gps16x_message()
4594                                            
4595                                            if (utc.valid)
4596                                            {
4597                                                    p = ap(buffer, 
sizeof(buffer), p, "gps_utc_correction=\"");
4598                                                    mk_utcinfo(p, 
utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf, 
BUFFER_SIZE(buffer, p));
4599                                                    p += strlen(p);
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "\"")" is never used.
4600                                                    p = ap(buffer, 
sizeof(buffer), p, "\"");
4601                                            }
4602                                            else
4603                                            {
4604                                                    p = ap(buffer, 
sizeof(buffer), p, "gps_utc_correction=\"<NO UTC DATA>\"");
4605                                            }
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 4604 in gps16x_message()
4598                                                    mk_utcinfo(p, 
utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf, 
BUFFER_SIZE(buffer, p));
4599                                                    p += strlen(p);
4600                                                    p = ap(buffer, 
sizeof(buffer), p, "\"");
4601                                            }
4602                                            else
4603                                            {
>>>     CID 979810:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "p" returned by "ap(buffer, 512UL, p, "gps_utc_correction=\"<NO 
>>> UTC DATA>\"")" is never used.
4604                                                    p = ap(buffer, 
sizeof(buffer), p, "gps_utc_correction=\"<NO UTC DATA>\"");
4605                                            }
4606                                            set_var(&parse->kv, buffer, 
sizeof(buffer), RO|DEF);
4607                                    }
4608                            break;
4609                            

________________________________________________________________________________________________________
*** CID 979811:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 2695 in l_mktime()
2689     
2690            s = delta % 60;
2691            delta /= 60;
2692            m = delta % 60;
2693            delta /= 60;
2694     
>>>     CID 979811:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "t" returned by "ap(buffer, 40UL, t, "%02d:%02d:%02d", 
>>> (int)delta, (int)m, (int)s)" is never used.
2695            t = ap(buffer, sizeof(buffer), t, "%02d:%02d:%02d",
2696                 (int)delta, (int)m, (int)s);
2697     
2698            return buffer;
2699     }
2700     

________________________________________________________________________________________________________
*** CID 979812:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3556 in parse_control()
3550     
3551                    start = tt = add_var(&out->kv_list, 128, RO|DEF);
3552                    tt = ap(start, 128, tt, "refclock_time=\"");
3553     
3554                    if (parse->timedata.parse_time.fp.l_ui == 0)
3555                    {
>>>     CID 979812:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "tt" returned by "ap(start, 128UL, tt, "<UNDEFINED>\"")" is 
>>> never used.
3556                            tt = ap(start, 128, tt, "<UNDEFINED>\"");
3557                    }
3558                    else
3559                    {
3560                            tt = ap(start, 128, tt, "%s\"",
3561                                
gmprettydate(&parse->timedata.parse_time.fp));
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3560 in parse_control()
3554                    if (parse->timedata.parse_time.fp.l_ui == 0)
3555                    {
3556                            tt = ap(start, 128, tt, "<UNDEFINED>\"");
3557                    }
3558                    else
3559                    {
>>>     CID 979812:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "tt" returned by "ap(start, 128UL, tt, "%s\"", 
>>> gmprettydate(&parse->timedata.parse_time.fp))" is never used.
3560                            tt = ap(start, 128, tt, "%s\"",
3561                                
gmprettydate(&parse->timedata.parse_time.fp));
3562                    }
3563     
3564                    if (!PARSE_GETTIMECODE(parse, &tmpctl))
3565                    {
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3584 in parse_control()
3578                                    (PARSEB_PPS|PARSEB_S_PPS);
3579     
3580                            (void)parsestate(tmpctl.parsegettc.parse_state, 
tt, BUFFER_SIZES(start, tt, 512));
3581     
3582                            tt += strlen(tt);
3583     
>>>     CID 979812:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "tt" returned by "ap(start, 512UL, tt, "\"")" is never used.
3584                            tt = ap(start, 512, tt, "\"");
3585     
3586                            if (tmpctl.parsegettc.parse_count)
3587                                mkascii(outstatus+strlen(outstatus), 
(int)(sizeof(outstatus)- strlen(outstatus) - 1),
3588                                        tmpctl.parsegettc.parse_buffer, 
(unsigned)(tmpctl.parsegettc.parse_count));
3589     
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3613 in parse_control()
3607                                    tt = ap(start, 80, tt, "%*.*s", 
3608                                            count,
3609                                            count,
3610                                            
tmpctl.parseformat.parse_buffer);
3611                            }
3612     
>>>     CID 979812:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "tt" returned by "ap(start, 80UL, tt, "\"")" is never used.
3613                            tt = ap(start, 80, tt, "\"");
3614                    }
3615     
3616                    /*
3617                     * gather state statistics
3618                     */
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 3662 in parse_control()
3656                                                        "%s", item);
3657                                            }
3658                                    sum += s_time;
3659                            }
3660                    }
3661                    
>>>     CID 979812:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "tt" returned by "ap(start, 300UL, tt, "; running time: %s\"", 
>>> l_mktime(sum))" is never used.
3662                    tt = ap(start, LEN_STATES, tt,
3663                        "; running time: %s\"", l_mktime(sum));
3664                    
3665                    tt = add_var(&out->kv_list, 32, RO);
3666                    snprintf(tt, 32,  "refclock_id=\"%s\"", 
parse->parse_type->cl_id);
3667                    

________________________________________________________________________________________________________
*** CID 979813:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 2576 in parsestate()
2570            
2571                                    t = ap(buffer, size, t, "%s",
2572                                        sflagstrings[i].name);
2573                            }
2574                            i++;
2575                    }
>>>     CID 979813:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "t" returned by "ap(buffer, size, t, ")")" is never used.
2576                    t = ap(buffer, size, t, ")");
2577            }
2578            return buffer;
2579     }
2580     
2581     /*--------------------------------------------------

________________________________________________________________________________________________________
*** CID 979814:  Unused pointer value  (UNUSED_VALUE)
/external/bsd/ntp/dist/ntpd/refclock_parse.c: 5807 in trimbletsip_message()
5801                    
5802                    default:
5803                            t = ap(pbuffer, sizeof(pbuffer), t, 
"<UNDECODED>");
5804                            break;
5805                    }
5806     
>>>     CID 979814:  Unused pointer value  (UNUSED_VALUE)
>>>     Pointer "t" returned by "ap(pbuffer, 200UL, t, "\"")" is never used.
5807                    t = ap(pbuffer, sizeof(pbuffer), t,"\"");
5808                    set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
5809            }
5810     }
5811     
5812     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
http://scan.coverity.com/projects/156?tab=Overview

To unsubscribe from the email notification for new defects, 
http://scan5.coverity.com/cgi-bin/unsubscribe.py




Home | Main Index | Thread Index | Old Index