New Defects reported by Coverity Scan for alfred

scan-admin at coverity.com scan-admin at coverity.com
Sat Mar 14 00:36:15 CET 2015


Hi,

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

5 new defect(s) introduced to alfred found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)


** CID 107162:    (TAINTED_SCALAR)
/recv.c: 52 in finish_alfred_push_data()
/recv.c: 87 in finish_alfred_push_data()
/recv.c: 87 in finish_alfred_push_data()


________________________________________________________________________________________________________
*** CID 107162:    (TAINTED_SCALAR)
/recv.c: 52 in finish_alfred_push_data()
46     	uint8_t *pos;
47     
48     	len = ntohs(push->header.length);
49     	len -= sizeof(*push) - sizeof(push->header);
50     	pos = (uint8_t *)push->data;
51     
>>>     CID 107162:    (TAINTED_SCALAR)
>>>     Using tainted variable "len" as a loop boundary.
52     	while (len >= (int)sizeof(*data)) {
53     		data = (struct alfred_data *)pos;
54     		data_len = ntohs(data->header.length);
55     
56     		/* check if enough data is available */
57     		if ((int)(data_len + sizeof(*data)) > len)
/recv.c: 87 in finish_alfred_push_data()
81     		/* free old buffer */
82     		if (dataset->buf) {
83     			free(dataset->buf);
84     			dataset->data.header.length = 0;
85     		}
86     
>>>     CID 107162:    (TAINTED_SCALAR)
>>>     Passing tainted variable "data_len" to a tainted sink.
87     		dataset->buf = malloc(data_len);
88     
89     		/* that's not good */
90     		if (!dataset->buf)
91     			goto err;
92     
/recv.c: 87 in finish_alfred_push_data()
81     		/* free old buffer */
82     		if (dataset->buf) {
83     			free(dataset->buf);
84     			dataset->data.header.length = 0;
85     		}
86     
>>>     CID 107162:    (TAINTED_SCALAR)
>>>     Passing tainted variable "data_len" to a tainted sink.
87     		dataset->buf = malloc(data_len);
88     
89     		/* that's not good */
90     		if (!dataset->buf)
91     			goto err;
92     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/2296?tab=overview

To manage Coverity Scan email notifications for "linux-merge at lists.open-mesh.org", click https://scan.coverity.com/subscriptions/edit?email=linux-merge%40lists.open-mesh.org&token=7ab23214402066d2a5af20dce20c1a31 .



More information about the linux-merge mailing list