OSDN Git Service

Replace all uses of sprintf() with snprint()
authorGeorge Burgess IV <gbiv@google.com>
Wed, 2 Mar 2016 22:00:19 +0000 (14:00 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 10 Oct 2016 23:48:29 +0000 (23:48 +0000)
commit80d7f60680f483a71e413f2453ab20013aff5c5c
treeeaa9a0dddddf66c58110c8831336e428f7e90f18
parentb2f7a959fd34b301913e4857089bb3cec63bfb83
Replace all uses of sprintf() with snprint()

- sprintf() does not limit the length of the character string when writing
  to a buffer and may result in buffer overflow
- snprintf() requires the maximum write length as a parameter. When the
  maximum length supported is smaller than the reserved buffer length,
  the call will not result in buffer overflow

Bug: 31859081
Test: TestTracker/64195/3975
Change-Id: I519f8ef7b9b162fd79094f89148250d783c734c0
23 files changed:
bta/ag/bta_ag_cmd.c
bta/gatt/bta_gattc_cache.cc
bta/jv/bta_jv_act.c
btcore/src/bdaddr.c
btcore/src/uuid.c
btif/co/bta_hh_co.cc
btif/include/btif_util.h
btif/src/btif_dm.cc
btif/src/btif_gatt_test.cc
btif/src/btif_hf.cc
btif/src/btif_hh.cc
btif/src/btif_storage.cc
btif/src/btif_util.cc
osi/src/config.c
stack/btm/btm_inq.c
stack/btm/btm_sec.c
stack/gatt/gatt_db.c
stack/gatt/gatt_utils.c
stack/l2cap/l2c_fcr.c
stack/pan/pan_utils.c
stack/sdp/sdp_db.c
stack/sdp/sdp_discovery.c
stack/smp/smp_keys.c