Parent: dbf12268ac30c66a64e7f5f152d49964b6900513
Author: Arman Uguray <armansito@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2014-11-18 16:34:07
Tree: 933ae687bfbf296ef03c2cab6e6554087a49b488
tools/btgatt-server: Free and early return if device name has length 0. In the write callback for the device name characteristic, we should check early if the value is being truncated completely and free the value and return. Otherwise, the realloc call might correctly return NULL if called with a length of 0, which would be incorrectly treated as an error.
Diffstat
| M | tools/btgatt-server.c | | | 8 | ++++++++ |
1 files changed, 8 insertions(+), 0 deletions(-)