From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, renu.tyagi@samsung.com
Subject: Re: coverity fix in alsa-libs
Date: Mon, 15 Sep 2014 17:36:02 +0600 [thread overview]
Message-ID: <5416CF22.1080200@gmail.com> (raw)
In-Reply-To: <50.84.05230.480B6145@epcpsbgx3.samsung.com>
15.09.2014 15:25, Renu Tyagi wrote:
> Hi,
>
> I ran Coverity analysis tool on alsa and found some bugs.
May I suggest that we remove aserver and the shm plugin instead of
applying the patch? Three days ago I tried to use it for testing my fix
to the share plugin, but failed. In other words: if even speaker-test
cannot be made to work on it without crashing and/or hanging or valgrind
errors, then I'd rather be aggressive here.
And next time please CC: Takashi Iwai on all alsa-lib patches :)
> Bug and Patch description
>
> 1. Changed file : aserver.c
> Socket not closed before returning when bind fails
> Community Code:
>
> if (bind(sock, (struct sockaddr *) addr, size) < 0) {
> int result = -errno;
> SYSERROR("bind failed");
> return result;
> }
> return sock;
> }
>
> Recommended Code :
>
> if (bind(sock, (struct sockaddr *) addr, size) < 0) {
> int result = -errno;
> SYSERROR("bind failed");
> close(sock);
> return result;
> }
> return sock;
> }
>
> 2.Changed file : control_shm.c
> Socket not closed before returning when connect fails
>
> Community Code:
> if (connect(sock, (struct sockaddr *) addr, size) < 0)
> return -errno;
> return sock;
> }
>
> Recommended Code :
> if (connect(sock, (struct sockaddr *) addr, size) < 0){
> SYSERR("connect failed");
> close(sock);
> return -errno;
> }
> return sock;
> }
>
> 3.Changed file : pcm_shm.c
> Socket not closed before returning when connect fails
>
> Community Code:
> if (connect(sock, (struct sockaddr *) addr, size) < 0) {
> SYSERR("connect failed");
> return -errno;
> }
> return sock;
> }
> Recommended Code :
> if (connect(sock, (struct sockaddr *) addr, size) < 0) {
> SYSERR("connect failed");
> close(sock);
> return -errno;
> }
> return sock;
> }
>
> PFA patch.
>
>
>
>
>
> Thanks & Regards,
>
> Renu Tyagi
>
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
--
Alexander E. Patrakov
next prev parent reply other threads:[~2014-09-15 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 9:25 coverity fix in alsa-libs Renu Tyagi
2014-09-15 11:36 ` Alexander E. Patrakov [this message]
2014-09-15 11:48 ` Takashi Iwai
2014-09-15 11:50 ` Takashi Iwai
[not found] <1E.9D.05030.0D7B7145@epcpsbgx4.samsung.com>
2014-09-16 14:40 ` Takashi Iwai
[not found] <0A.06.05230.43DF8145@epcpsbgx3.samsung.com>
2014-09-17 5:52 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2014-09-18 3:57 Renu Tyagi
[not found] <B6.74.04938.0385A145@epcpsbgx1.samsung.com>
[not found] ` <26983035.79381411012655765.JavaMail.weblogic@epv6ml12>
2014-09-18 7:11 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5416CF22.1080200@gmail.com \
--to=patrakov@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=renu.tyagi@samsung.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.