From patchwork Wed May 8 02:39:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48651 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9c99:b0:1af:836d:81b3 with SMTP id mj25csp275504pzb; Tue, 7 May 2024 19:39:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7ntQXetzWh+bapfcfpDedhEARdol110DjU0KPXwTHeNfcIj2HSINKEIoKVcuzpq4/roqdBVDgRisxKAZgwmAsycTAY95fCssG+w== X-Google-Smtp-Source: AGHT+IGHR4NbISIS7x1xOTQB2Ocoi7y5aOg97OZU0hZb5x7dabhzYpA/7KheL+T2gngI+a/d9wMd X-Received: by 2002:a19:8c46:0:b0:51b:abbf:7585 with SMTP id 2adb3069b0e04-5217d438762mr611412e87.5.1715135976945; Tue, 07 May 2024 19:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715135976; cv=none; d=google.com; s=arc-20160816; b=pFLQsWqCb8So6Fkwynr8nc2r0xo1WyiO1KHDIRMbeVwmnMIUXwEOVDdbydttpkt4cI ntShhxlAvlbkWFCsLTsonp5dsGR+MyLNwKeF/5WH8Smkv9vvrzedYVtKEBbOuZ+14a3s N7YDHZsvxdSCGDMgzMHnioDAyeq9k/3ome/XVXLnsDwM/LnHoyK9AeshXSvjsliY+fvy QoFjdH3Xaq8f7ebT+2WlDvsdWNAvSUlpqQxlzk575HXBNI0O9T14eNFxv/fDui8rnHLb Y6ldpyXmrLFyeip4SJz1VQatAPimVRy9IkWMyf+8Wjbyuq3u1VoiNHXEERXFisBXsv72 8gUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=IpUyXONY6tLnDX3ToxM5O/XwQ5H4NQ+llpXJjZaAQBc=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=YcjlHwwB/E6ijwEQUCeAz8FK9jOm+367e+zaYwJFVF3b2RvXFYxw6qAAOmHu65VOY1 uoj+wuCQf5MJ0uTOB+fEMBfOlS/utM2tlVNSfzl6jBavbByPQh9eO+v10+8IBSpmQAXl b4a+ipoDLV5togV73yPHl/b0Lc8/hvXDma+FRKd7IDbf5tMt4eXlRINCp0sZqEEuaVsU 3VF+MTxtRN2PXwwJGsd+w+QIjTG6GQYhAk1WjtbLSHmiBZHbnOUaUOOgV8snIMnkm8Oh ojCg57z9MnPA3gxBu6SREr8cIov81ezkZX1mAlfIUMBWZgDiyCVYckrAqocX4NsIjEya nKYQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=f+qyzLM1; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cm28-20020a170906f59c00b00a59a1e50b19si4875146ejd.449.2024.05.07.19.39.36; Tue, 07 May 2024 19:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=f+qyzLM1; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C8AB168CEBC; Wed, 8 May 2024 05:39:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 90E8C68A304 for ; Wed, 8 May 2024 05:39:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 86BF01C0003 for ; Wed, 8 May 2024 02:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715135964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WiPU1KdNNds6kXYGSlEZFwuzeg7cTrw1Xfn36wUBkYw=; b=f+qyzLM1r2jjZVeUZLYtiU8GM7Ne4j72phVrLVO9ZTEutl+ASceuxdTMXlyvfq2O5H5Qm5 ZidekGOYqgkiAysGv4KXABBpUFUSBL9ZT5ZHKbRn77e2leuz/eShujAPSzY3W8KTBoWrFP 9/SJGnGu5i5REZx3KauouyzFdXcMRF8On/zk1BHNJ1gtqqFcr+VU7EeySQRoNDNtKNNrlA sdyLMo42Dhsx07A9TaXAHYLoY5a1+MW1S6jx4qTrse7VHZKQZxbL265OuxQ9OxOhON71Gx rWxpy5cuezCrzr11B+HGqVCWTisrQxsV2kXK3nzEpMDyh+BvR1anTyl5Zlx5IA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 8 May 2024 04:39:21 +0200 Message-ID: <20240508023923.28209-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/cbs_jpeg: Assert that cbs_jpeg_assemble_fragment() stays within the array 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lRhYOoaW/QKa Inspired by: CID1473561 Untrusted pointer write Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/cbs_jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c index b1b58dcd65e..628841c5f37 100644 --- a/libavcodec/cbs_jpeg.c +++ b/libavcodec/cbs_jpeg.c @@ -401,6 +401,7 @@ static int cbs_jpeg_assemble_fragment(CodedBitstreamContext *ctx, } else { data[dp++] = unit->data[sp]; } + av_assert0(dp <= size - 2); } } } From patchwork Wed May 8 02:39:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48652 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9c99:b0:1af:836d:81b3 with SMTP id mj25csp275542pzb; Tue, 7 May 2024 19:39:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7xYLg8rBKamrxTnMEXsIaTIv4esEN/3NhLLiGIR+SsS4qlDRpeD8E8ne4Y/LOtcipmT+wsBYnylQL92cZhVAYdCZoO30M86Wivg== X-Google-Smtp-Source: AGHT+IG+XeypSqQoRmsZ17gLhmd4eHmw8exCAt+vqfr1krraBGmZ8rUWP+PcRtIlea+z8n4aL/wc X-Received: by 2002:a50:c34f:0:b0:570:5b3d:ed with SMTP id 4fb4d7f45d1cf-5731d9b78dfmr949031a12.2.1715135987930; Tue, 07 May 2024 19:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715135987; cv=none; d=google.com; s=arc-20160816; b=oPHN7erE0Of0YX0FY30LuptUgmBktcICp2s5Yz2jAdZg0kUGnySwKyNs/LD2rpqrSz QhTtSyjOgJvSPeeM1V0Y1vGHOtHuKEjH1hLLkB6BBxZhK2CgeIqV4wukDyC7WRPewwxc GQ+c+w1qS2pD4KNl8ypFBrlm0JYJyVdqo96cK2QMHBAJ8euubhCa2GMWe0SjFyXiCTP+ w4HoUuZD8GoLxAH6SQB2keTP3SKrx+z9Ik0G3A7UYDiDQnk7gHywYLvbSorrhK95VWwo hqCCB42SGuQVro6b822RXrS6P67stE2c1fEZaWX62HBkWZ6hOm+JG/me+WxnOcRMYQJg kwXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=VeirBwUd14Ui1smmRkxT4nBzVIuKKh20VZfnH2VX8yY=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=o93b8HGgBZhJ/BrhXngLz5ziLjoJfcvkBFIwfjEAeqzPVmYmrNL8sS3LzsKRPHYi9O LZefEab5a+TZ0hElr1KrxqhcKRPsfViD++MNi747axrliw+22mP1Jc6xtOsH34WcwjoJ AEsrrDO1/IOyxtHv0vtupOJmZhrwZG4myZE/TGFm6Z8OxLp4nz0rU3t7EvtoV0gPVTNm xczXb8QFUd8ZrR9nNiyLYQBY36qoSFPwFDIh8Nz9eeQ4tdkFOjfhVQ5c+a9h64Z2Gr7o n1gkC0YzaRq9gQPB9hu+m8wESM+NXd9vutRZUQwCgq/VnGNziQnajKJJRG/7RfwJmQZb h7Bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=kMn+Q5bb; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p17-20020aa7d311000000b00572a20a9c52si6719523edq.325.2024.05.07.19.39.47; Tue, 07 May 2024 19:39:47 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=kMn+Q5bb; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6EDF868C371; Wed, 8 May 2024 05:39:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 65A3268CA42 for ; Wed, 8 May 2024 05:39:26 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 91B3820002 for ; Wed, 8 May 2024 02:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715135965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=snd9ZKuVpFm5tZo+yit5Qz9IuYQWRBvDRNQuj3pxcZ8=; b=kMn+Q5bbbZA+Feaz0iP06RXlYjqQ8HavxZzcMGSsmpbJgrP3CsmAn0T5jPxtmzUXCZx56s QQ/yg2S0Wg1oNewQk0R3H2bU84DWoJFu6F3O/7wvq+OfAoYh70wjk8Z22YRr+FYFQADIsj j4kTDZkKkEMrorRH63jigygf0KuSbTfdrA/l6oOSykH0bujYG/Caua1yiHlIfPgMpZmNpC jXRRNdne/v+qR71UslL6POVb5xNxCiabiWQMNGPp2IjQD3nI0QcUwj/yT/eZEjldFQS7m9 TBNHh+Bj5MWovaJ/l/xjQR2QLsyoHhAGT+jxDESzlfZ/cmfMyB/Vomwa/eZLLw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 8 May 2024 04:39:22 +0200 Message-ID: <20240508023923.28209-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240508023923.28209-1-michael@niedermayer.cc> References: <20240508023923.28209-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/3] avformat/sdp: Check before appending ", " 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tISuzb/hNCC7 Found by reviewing code related to CID1500301 String not null terminated Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/sdp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 7e11a759185..ccfaa8aff58 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -203,6 +203,8 @@ static int extradata2psets(AVFormatContext *s, const AVCodecParameters *par, continue; } if (p != (psets + strlen(pset_string))) { + if (p - psets >= MAX_PSET_SIZE) + goto fail_in_loop; *p = ','; p++; } @@ -213,6 +215,7 @@ static int extradata2psets(AVFormatContext *s, const AVCodecParameters *par, if (!av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r)) { av_log(s, AV_LOG_ERROR, "Cannot Base64-encode %"PTRDIFF_SPECIFIER" %"PTRDIFF_SPECIFIER"!\n", MAX_PSET_SIZE - (p - psets), r1 - r); +fail_in_loop: av_free(psets); av_free(tmpbuf); From patchwork Wed May 8 02:39:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48653 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9c99:b0:1af:836d:81b3 with SMTP id mj25csp275585pzb; Tue, 7 May 2024 19:39:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVUgtRoF1XYLRfoOgob5tlxiPjSdWaRl8njAT6JSp1JOcqQ07QUVAiJN1K3LEoxlHXvn9qDPzJxpe8a5zpcuencCrr/cpIw0KAIVA== X-Google-Smtp-Source: AGHT+IFASddAUa515PSf9DmGVsTZRjPjMGS1lSwOqH7ddbeWBjVA2vH9DECwXmcJab5Qbu10F0f8 X-Received: by 2002:ac2:5311:0:b0:51d:a5fb:bfd8 with SMTP id 2adb3069b0e04-5217c75ff73mr887266e87.32.1715135997833; Tue, 07 May 2024 19:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715135997; cv=none; d=google.com; s=arc-20160816; b=ip996L7Uaqxa5tTPSeR7qlaH4B+GlbM1SghYvtoyH+zL64nlJZKARQ5hFkkUMySgQj svovngDx2stwgrBFd6OQ4H11nk+azhQJWMLz6SCd54P80hWsIftjNWcvEZVsfLtdcBBD GxrdXlkIceSGko89dtI8gxrpuEBNWlhtCgRimodtbYJwlztybRYs+lzXd+kjPtFiTMTZ /4xwRgYz9D4GejVBuBOn6NxOsLM5k1TiTpV+AtQJ9jrHRidVmbsw8VWdStnf9AsLJNhi 2s/VZxei03SRKriqZHIQY6Tavh0doSZMNIBpOFwCQTIizGkDi/WaojJq8+szQPgeQViB Z84Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=1djrmzSR0yqRV8UmPLiX6MiWDbWU67Dri0ri2WHy45w=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=DYGuv2V9HTOrNBWT/9v3ByTTOOGDST65hcEsq4MXftqrQ/lb2Io5tDvNOVOIE7VlII umcCsp9ROm4cwcTKvm3tT3Wv3uemS4O0LvaVKWIsuv5tdhib7NeoNksbBM8DRA4RJRx1 w57lfkmWeBT2pty9Ejwh6TVBTMhsMSjto7+YkXxqlSd78NgSZ9CSFDJmodE5b0grs4Kd 7WRORS0Z5KKDomWHUmKvS6bqs1H2SYhjBPcyFD/5+QHxZzSERHKqTwkkl2Bb9mNQyebD MgRrhVQVMBo0VXtKKGxfVWr/mV+5QqRnhRKLonABC4aY8yPU+xzcipZXQUYRFuw8roua d5gQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=d5GTvStx; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x12-20020ac259cc000000b0051ef34b6255si3861631lfn.213.2024.05.07.19.39.57; Tue, 07 May 2024 19:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=d5GTvStx; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB7CE68D555; Wed, 8 May 2024 05:39:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C93A68D239 for ; Wed, 8 May 2024 05:39:27 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 919DAFF802 for ; Wed, 8 May 2024 02:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715135966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bhr5sEGoxE5ljZ2Q2cgLbAC5NIV0OK6kz5Or32R+F1U=; b=d5GTvStxpDDJi8PXGLwfHzUjNFb8fkY/kQa6GnIFDRfDxPe8muMTkNglVjLQ27PqDfMn1+ BEf3n+WAgYgIecEMoKXcx+/hlPCWIljz9LAqE+NXKU5cqwxILtIf0RTBxiUYX5MJD0vGJW oHjbTfZx9sD2K2tA6LbbzaFpeC83pLeRpfPULbC/wKnV0X22aCJT56Zm5QVV/PFDBzJ8Ih 20MI5zfDdXiIFow6TLnz6uAHXGtY2SB7+dbbNCwVY362Uc7Nugkgks8EiEqUaoxbypY4aX 1oAz5kpUtH+4KL5bfFRDC/ewnSwJtJ9qXTtWOeyk6zeX3LvlYfoOpsUa/wVj5A== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 8 May 2024 04:39:23 +0200 Message-ID: <20240508023923.28209-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240508023923.28209-1-michael@niedermayer.cc> References: <20240508023923.28209-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/3] avformat/img2dec: assert no pipe on ts_from_file 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: jle7DkGUXoaM Help coverity with CID500302 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/img2dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index a40675d4341..6220003fb4d 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -25,6 +25,7 @@ #define _DEFAULT_SOURCE #define _BSD_SOURCE #include +#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/log.h" #include "libavutil/mem.h" @@ -504,6 +505,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) pkt->flags |= AV_PKT_FLAG_KEY; if (s->ts_from_file) { struct stat img_stat; + av_assert0(!s->is_pipe); if (stat(filename, &img_stat)) { res = AVERROR(EIO); goto fail;