diff options
author | wu zheng <wu.zheng@intel.com> | 2014-11-24 03:37:46 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2014-11-24 03:37:46 -0800 |
commit | 7748c2a531a479031c04a2f17caf733cc8a1ec67 (patch) | |
tree | eb694b58d3c15c025eeb77586960ebeecad6190b | |
parent | 2c2eea910ae0f4a3ef9f10c2b610a13dcb64eb4e (diff) | |
parent | 1100e3a228976dacbb6c6fcc29c523dec8ac49ad (diff) | |
download | bluez-7748c2a531a479031c04a2f17caf733cc8a1ec67.tar.gz bluez-7748c2a531a479031c04a2f17caf733cc8a1ec67.tar.bz2 bluez-7748c2a531a479031c04a2f17caf733cc8a1ec67.zip |
Merge "Fix Security Static Code Analysis Bug-Tizen: TC-2072" into tizensubmit/tizen_ivi/20141201.222222submit/tizen/20141124.114031accepted/tizen/mobile/20141128.101138accepted/tizen/ivi/20141204.033203accepted/tizen/common/20141124.170312
-rw-r--r-- | obexd/plugins/pbap.c | 4 | ||||
-rw-r--r-- | profiles/network/server.c | 2 | ||||
-rw-r--r-- | src/device.c | 2 | ||||
-rw-r--r-- | tools/hciattach.c | 2 | ||||
-rw-r--r-- | tools/hcitool.c | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 79e85ab9..c3b79d54 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -756,7 +756,7 @@ static void *vobject_list_open(const char *name, int oflag, mode_t mode, { struct pbap_session *pbap = context; struct pbap_object *obj = NULL; - int ret; + int ret = 0; void *request; DBG("name %s context %p valid %d", name, context, pbap->cache.valid); @@ -810,7 +810,7 @@ static void *vobject_vcard_open(const char *name, int oflag, mode_t mode, struct pbap_session *pbap = context; const char *id; uint32_t handle; - int ret; + int ret = 0; void *request; DBG("name %s context %p valid %d", name, context, pbap->cache.valid); diff --git a/profiles/network/server.c b/profiles/network/server.c index 4834ce80..e8ca3bd8 100644 --- a/profiles/network/server.c +++ b/profiles/network/server.c @@ -344,7 +344,7 @@ static gboolean bnep_setup(GIOChannel *chan, GIOCondition cond, gpointer user_data) { struct network_adapter *na = user_data; - struct network_server *ns; + struct network_server *ns = NULL; struct network_session *session; uint8_t packet[BNEP_MTU]; struct bnep_setup_conn_req *req = (void *) packet; diff --git a/src/device.c b/src/device.c index a4b5e936..d55b9cda 100644 --- a/src/device.c +++ b/src/device.c @@ -274,7 +274,7 @@ static GSList *find_service_with_state(GSList *list, static void update_technologies(GKeyFile *file, struct btd_device *dev) { - const char *list[2]; + const char *list[2] = {NULL, NULL}; size_t len = 0; if (dev->bredr) diff --git a/tools/hciattach.c b/tools/hciattach.c index c213fe43..424748b5 100644 --- a/tools/hciattach.c +++ b/tools/hciattach.c @@ -1464,7 +1464,7 @@ int main(int argc, char *argv[]) dev[0] = 0; if (!strchr(opt, '/')) strcpy(dev, "/dev/"); - strcat(dev, opt); + strncat(dev, opt, PATH_MAX); break; case 1: diff --git a/tools/hcitool.c b/tools/hcitool.c index e1effc4b..59102f95 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -2385,7 +2385,8 @@ failed: static int print_advertising_devices(int dd, uint8_t filter_type) { - unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr; + unsigned char buf[HCI_MAX_EVENT_SIZE] = {0}; + unsigned char *ptr; struct hci_filter nf, of; struct sigaction sa; socklen_t olen; |