[dpdk-dev] Ignoring number of bytes read in eal

Kobylinski, MichalX michalx.kobylinski at intel.com
Tue Jun 28 10:40:16 CEST 2016


Hi David,

I'm working on issue reported by Coverity.

CID 13212 - Ignoring number of bytes read:
The number of bytes copied into the buffer can be smaller than the requested number and the buffer can potentially be accessed out of range.
In rte_mem_virt2phy: Value returned from a function and indicating the number of bytes read is ignored.

File: /lib/librte_eal/linuxapp/eal/eal_memory.c
Line: 187

Can I mark this error as "False Positive"?

Because return from read function is checked in "if" condition. If return from read is less than 0 function rte_mem_virt2phy is aborted and return: log message, RTE_BAD_PHYS_ADDR.

What's your opinion?

Regards,
Michal


More information about the dev mailing list