obexd: Fix possible invalid memory access
obexd: Fix possible invalid memory access

Issue: As reported by static code analyzer (Coverity), if buffer is NULL
and aparams is not NULL, then buffer gets dereferenced in string_read
function.

Fix: Application parameter is allocated only if maxlistcount is zero
during phonebooksize request and buffer is allocated in case of pull
phonebook request, hence modify logic to avoid application parameter
check, as it is tightly coupled with maxlistcount.

ComputeCycles/bluez,mapfau/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,silent-snowman/bluez,mapfau/bluez,ComputeCycles/bluez,ComputeCycles/bluez,mapfau/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,silent-snowman/bluez,pkarasev3/bluez,pkarasev3/bluez,silent-snowman/bluez,ComputeCycles/bluez,pkarasev3/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez