From 37b43be5f7890f6800e2e0d6b9bffbec447feabb Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Wed, 28 Aug 2019 16:43:57 +0900 Subject: [PATCH] fixup! acm: Fix coverity defects [Version] 11.1.72 [Issue Type] Security Change-Id: I1dcd3ea1626f0113b3d2696748c9d2ca4412808e --- packaging/pulseaudio-modules-tizen.spec | 2 +- src/acm.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packaging/pulseaudio-modules-tizen.spec b/packaging/pulseaudio-modules-tizen.spec index d71d26f..8e4203a 100644 --- a/packaging/pulseaudio-modules-tizen.spec +++ b/packaging/pulseaudio-modules-tizen.spec @@ -1,6 +1,6 @@ Name: pulseaudio-modules-tizen Summary: Pulseaudio modules for Tizen -Version: 11.1.71 +Version: 11.1.72 Release: 0 Group: Multimedia/Audio License: LGPL-2.1+ diff --git a/src/acm.c b/src/acm.c index 2019e52..6494e4f 100644 --- a/src/acm.c +++ b/src/acm.c @@ -270,7 +270,12 @@ static int ipc_get_client_fd(struct userdata *u, ipc_channel_t channel) close(sockfd); return -1; } - fcntl(sockfd, F_SETFL, flag | O_NONBLOCK); + + if (fcntl(sockfd, F_SETFL, flag | O_NONBLOCK) != 0) { + pa_log_error("unable to set file status on socket fd %d: %s", sockfd, pa_cstrerror(errno)); + close(sockfd); + return -1; + } } memset(&address, 0, sizeof(address)); -- 2.7.4