[PATCH BlueZ v2 0/1] Fix null pointer dereference in util_ltv_foreach

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

 



In the existing code, iov structure is initialized with iov.iov_base = (void *)
data. If data is NULL,casting (void *) NULL to iov_base results in a null 
pointer dereference.Inside the loop of util_ltv_foreach, 
util_iov_pull_u8(&iov, &l) is called to pull uint8_t values from iov.
If iov.iov_base (derived from data) is NULL,attempting to dereference it in 
util_iov_pull_u8 will cause a segmentation fault.

Added NULL pointer check for data so it will presvent null pointer dereference



Sarveshwar Bajaj (1):
  shared/util: Fix null pointer dereference in util_ltv_foreach()

 src/shared/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.21.0.windows.1





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux