New Defects reported by Coverity Scan for ceph

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

 



Hi,

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

1 new defect(s) introduced to ceph found with Coverity Scan.


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


** CID 1255369:  Copy into fixed size buffer  (STRING_OVERFLOW)
/common/blkdev.cc: 34 in block_device_support_discard(const char *)()


________________________________________________________________________________________________________
*** CID 1255369:  Copy into fixed size buffer  (STRING_OVERFLOW)
/common/blkdev.cc: 34 in block_device_support_discard(const char *)()
28     bool block_device_support_discard(const char *devname)
29     {
30       bool can_trim = false;
31       char *p = strstr((char *)devname, "sd");
32       char name[32] = {0};
33     
>>>     CID 1255369:  Copy into fixed size buffer  (STRING_OVERFLOW)
>>>     You might overrun the 32 byte fixed-size string "name" by copying "p" without checking the length.
34       strcpy(name, p);
35       for (unsigned int i = 0; i < strlen(name); i++) {
36         if(isdigit(name[i])) {
37           name[i] = 0;
38           break;
39         }


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

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



--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux