New Defects reported by Coverity Scan for sbabic/swupdate

9 views
Skip to first unread message

scan-...@coverity.com

unread,
Apr 22, 2026, 11:29:52 AM (3 days ago) Apr 22
to swup...@googlegroups.com

Hi,

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

  • New Defects Found: 3
  • Defects Shown: Showing 3 of 3 defect(s)

Defect Details

** CID 645760:       Resource leaks  (RESOURCE_LEAK)
/mongoose/mongoose.c: 10535           in mg_getlocaddr()


_____________________________________________________________________________________________
*** CID 645760:         Resource leaks  (RESOURCE_LEAK)
/mongoose/mongoose.c: 10535             in mg_getlocaddr()
10529         return;
10530       }
10531       // NOTE(): TI-RTOS NDK may require binding
10532       slen = tousa(to, &usa);
10533       if ((rc = connect(fd, &usa.sa, slen)) != 0) {
10534         mg_error(c, "connect: %d", MG_SOCK_ERR(rc));
>>>     CID 645760:         Resource leaks  (RESOURCE_LEAK)
>>>     Handle variable "fd" going out of scope leaks the handle.
10535         return;
10536       }
10537       setlocaddr(fd, addr);
10538       closesocket(fd);
10539     }
10540     

** CID 645759:       Memory - illegal accesses  (RETURN_LOCAL)
/handlers/flash_handler.c: 457           in flash_write()


_____________________________________________________________________________________________
*** CID 645759:         Memory - illegal accesses  (RETURN_LOCAL)
/handlers/flash_handler.c: 457             in flash_write()
451     		int data_offset;
452     
453     		assert(priv->eb <= priv->eb_end);
454     		if (priv->eb == priv->eb_end)
455     			return too_many_bad_blocks(priv->mtdnum);
456     
>>>     CID 645759:         Memory - illegal accesses  (RETURN_LOCAL)
>>>     Using "pbuf", which points to an out-of-scope variable "read_modify_buf".
457     		ret = read_data(priv, pbuf, &len, &wbuf, &to_write);
458     		if (ret < 0) {
459     			/* Wait for more data to be written in next
460     			 * flash_write() call. */
461     			break;
462     		}

** CID 645758:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 645758:         Null pointer dereferences  (FORWARD_NULL)
/handlers/flash_handler.c: 457             in flash_write()
451     		int data_offset;
452     
453     		assert(priv->eb <= priv->eb_end);
454     		if (priv->eb == priv->eb_end)
455     			return too_many_bad_blocks(priv->mtdnum);
456     
>>>     CID 645758:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pbuf" to "read_data", which dereferences it.
457     		ret = read_data(priv, pbuf, &len, &wbuf, &to_write);
458     		if (ret < 0) {
459     			/* Wait for more data to be written in next
460     			 * flash_write() call. */
461     			break;
462     		}

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team

Reply all
Reply to author
Forward
0 new messages