mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
fix 2 small bugs found by coverity
This commit is contained in:
parent
d73efd7d38
commit
7b8a784c4f
@ -413,7 +413,6 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct lowpan6_link_addr
|
|||||||
|
|
||||||
/* Fragment follows. */
|
/* Fragment follows. */
|
||||||
data_len = (max_data_len - 4) & 0xf8;
|
data_len = (max_data_len - 4) & 0xf8;
|
||||||
frag_len = (127 - ieee_header_len - 4 - 2) & 0xf8;
|
|
||||||
frag_len = data_len + lowpan6_header_len;
|
frag_len = data_len + lowpan6_header_len;
|
||||||
|
|
||||||
pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len + 4, frag_len - lowpan6_header_len, 0);
|
pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len + 4, frag_len - lowpan6_header_len, 0);
|
||||||
@ -537,6 +536,7 @@ lowpan6_hwaddr_to_addr(struct netif *netif, struct lowpan6_link_addr *addr)
|
|||||||
{
|
{
|
||||||
addr->addr_len = 8;
|
addr->addr_len = 8;
|
||||||
if (netif->hwaddr_len == 8) {
|
if (netif->hwaddr_len == 8) {
|
||||||
|
LWIP_ERROR("NETIF_MAX_HWADDR_LEN >= 8 required", sizeof(netif->hwaddr) >= 8, return ERR_VAL;);
|
||||||
SMEMCPY(addr->addr, netif->hwaddr, 8);
|
SMEMCPY(addr->addr, netif->hwaddr, 8);
|
||||||
} else if (netif->hwaddr_len == 6) {
|
} else if (netif->hwaddr_len == 6) {
|
||||||
/* Copy from MAC-48 */
|
/* Copy from MAC-48 */
|
||||||
|
Loading…
Reference in New Issue
Block a user