summaryrefslogtreecommitdiff
path: root/bootstrap-configure
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-05-28 21:33:05 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-05-28 23:08:22 +0300
commita3671b9d0e7b9df21a1539d3e952b099900b8d10 (patch)
tree603a7f478409c7750031ddd59c7ec774a8a7e139 /bootstrap-configure
parente1942bc1bef0575da5787127854fa7e56acef0a7 (diff)
downloadbluez-a3671b9d0e7b9df21a1539d3e952b099900b8d10.tar.gz
attrib-server: Allow zero length attribute update
attrib_db_update always fails when g_try_realloc returns NULL, not taking into account that the length passed to g_try_realloc could be zero. In this case, g_try_realloc frees the currently allocated memory and returns NULL. As a result, not only will attrib_db_update fail needlessly, a use-after-free could occur as the attribute's length will still hold the length of the freed buffer. Fix this by only returning an error if the length is non-zero.
Diffstat (limited to 'bootstrap-configure')
0 files changed, 0 insertions, 0 deletions