From: Seungbae Shin Date: Thu, 20 Oct 2022 10:42:36 +0000 (+0900) Subject: ladspa/acm: fix svace defects X-Git-Tag: accepted/tizen/unified/20221102.020514~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=976df3474893103e0243e2029af8abaf1e29fcd5;p=platform%2Fcore%2Fmultimedia%2Fpulseaudio-modules-tizen.git ladspa/acm: fix svace defects Checker: SEC_DO_NOT_USE_INT_IN_FOR_LOOP SEC_DO_NOT_ASSIGN_SIZE_OF_INT [Version] 15.0.31 [Issue Type] Svace Change-Id: Idfe703452c983f3cd5f49c3a6c7a6ad6ae8a6720 --- diff --git a/packaging/pulseaudio-modules-tizen.spec b/packaging/pulseaudio-modules-tizen.spec index aad852b..89d8757 100644 --- a/packaging/pulseaudio-modules-tizen.spec +++ b/packaging/pulseaudio-modules-tizen.spec @@ -2,7 +2,7 @@ Name: pulseaudio-modules-tizen Summary: Pulseaudio modules for Tizen -Version: 15.0.30 +Version: 15.0.31 Release: 0 Group: Multimedia/Audio License: LGPL-2.1+ diff --git a/src/acm.c b/src/acm.c index 7f697c2..57deaf2 100644 --- a/src/acm.c +++ b/src/acm.c @@ -226,7 +226,7 @@ typedef enum { static int ipc_get_client_fd(struct userdata *u, ipc_channel_t channel) { struct sockaddr_un address; - int len, ret = IPC_ERR; + int ret = IPC_ERR; int sockfd; int n_opt_val; unsigned int n_opt_len = sizeof (n_opt_val); @@ -281,9 +281,8 @@ static int ipc_get_client_fd(struct userdata *u, ipc_channel_t channel) memset(&address, 0, sizeof(address)); address.sun_family = AF_UNIX; strncpy(address.sun_path, socket_path, sizeof(address.sun_path) - 1); - len = sizeof(address); - if ((ret = connect(sockfd, (struct sockaddr *)&address, len)) < 0) { + if ((ret = connect(sockfd, (struct sockaddr *)&address, (socklen_t)sizeof(address))) < 0) { pa_log_error("connect failure: %s, path: %s", pa_cstrerror(errno), socket_path); close(sockfd); return -1; diff --git a/src/ladspa/delay.c b/src/ladspa/delay.c index 76eb832..365fb1b 100644 --- a/src/ladspa/delay.c +++ b/src/ladspa/delay.c @@ -336,7 +336,7 @@ _init() { /* _fini() is called automatically when the library is unloaded. */ void _fini() { - long lIndex; + unsigned long lIndex; if (g_psDescriptor) { free((char *)g_psDescriptor->Label); free((char *)g_psDescriptor->Name);