From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 989E04982D for ; Mon, 20 May 2024 13:37:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4B74F68D130; Mon, 20 May 2024 16:37:03 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E70268CF59 for ; Mon, 20 May 2024 16:36:57 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9AD1F1C0007 for ; Mon, 20 May 2024 13:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716212216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SBrh60VpJYeNDe4LCLTKt5n8Qd+uadekKOxqi8oP9Ko=; b=H8Te8n5jqRBJMVYQ/PHXJEY+K+aJNoX6c5flOLQ+EbqxY6fRfJem1H8MoqwY80FLdhRkNm 0qk+34sE3/4/WOO6SNaLXy6c/8lYSrVGMvrSTl2PJfHdK7lUcjk/hXcYJG26OFQkkFk/oU qGNfNYiO+XiR/aloAPlt7Y9QaNhcW4oMtdVlzYV5zwI1XoxmedRc+HKCmLqYv6UPdEfW1Q siWpmHRCT0yjIaVxuCSTC7YXbF7vnJ38XvshBNt3MiVeLM+e8mqKNK8eJ54eqNZSCq9gFJ RyKoX8Q/CblDrqHLv+i2JeZ4a0ntWYeid0juZdAbfrRSGEpsP/tebYOJ2bD7EQ== Date: Mon, 20 May 2024 15:36:55 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240520133655.GS2821752@pb2> References: <20240520021944.361686-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_drm: Check ioctl in drm_map_frame() for failure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============5434020386577686625==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5434020386577686625== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1Sa0i77dkqaUxqYg" Content-Disposition: inline --1Sa0i77dkqaUxqYg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 20, 2024 at 11:33:41AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: CID1583742 Unchecked return value > >=20 > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavutil/hwcontext_drm.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > >=20 > > diff --git a/libavutil/hwcontext_drm.c b/libavutil/hwcontext_drm.c > > index 0847db09a08..e080c0597b8 100644 > > --- a/libavutil/hwcontext_drm.c > > +++ b/libavutil/hwcontext_drm.c > > @@ -166,7 +166,10 @@ static int drm_map_frame(AVHWFramesContext *hwfc, > > #if HAVE_LINUX_DMA_BUF_H > > /* We're not checking for errors here because the kernel may n= ot > > * support the ioctl, in which case its okay to carry on */ > > - ioctl(desc->objects[i].fd, DMA_BUF_IOCTL_SYNC, &sync_start); > > + if (ioctl(desc->objects[i].fd, DMA_BUF_IOCTL_SYNC, &sync_start= ) =3D=3D -1) { > > + err =3D AVERROR(errno); > > + goto fail; > > + } > > #endif > > } > > map->nb_regions =3D i; >=20 > Did you read the comment above the code? Apparently not patch droped, will mark this as intentional thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin --1Sa0i77dkqaUxqYg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZktR8wAKCRBhHseHBAsP q/phAJ0aTsU2lWu8PPPHN1WroLX+yWaETQCdEsAqjRvGJe6r9sWvJNBeLPOvDa8= =bqq8 -----END PGP SIGNATURE----- --1Sa0i77dkqaUxqYg-- --===============5434020386577686625== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============5434020386577686625==--