From patchwork Wed Aug 28 01:08:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51198 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c944:0:b0:48e:c0f8:d0de with SMTP id k4csp590692vqt; Tue, 27 Aug 2024 18:15:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWJYjhsnhr0bM9kHVmyWLhz33Ev/K7ehtYrrjVNySGy9J6cZysKpa+ddw+wxSYg1nJVaPVTiscKDR8Pcz+x5oIf@gmail.com X-Google-Smtp-Source: AGHT+IEkM/sGDKmu02JX6d1w6q4pL77h3PmcSBPyENz1QXXkznfixJ1pvJ0slXj2fSZihNDiEioD X-Received: by 2002:a17:907:31cc:b0:a86:a909:4f67 with SMTP id a640c23a62f3a-a870aaed8f1mr34909966b.52.1724807708658; Tue, 27 Aug 2024 18:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724807708; cv=none; d=google.com; s=arc-20240605; b=HVs7LPLl7Hz27SWawUACLbb945z07xdKCy78HjuGtUrPbAx4GUaLtB6sBCv5mFi6PD kCyz0Il7oOhM9bwiTRwjyWiyEtlTOAOZtT8t4RKE+MXzW3NNDolzMYUxt3of9s8F66rA Z8F+uB6M5kUiBVRAhWKi5/xPaVojv64KGcRd4M/vYS5woLN55ILidWyAmcUzNWYa7dAf JcYXc3yu0EonLqb59McwNKdpcTihiZULg0zJAR7/ZoD2qUDC+mSK4K/ArRI5ronwqPFH eFK7ydIR2ESISxNeZLRhB/PyienNsYDMEzk7wF1ykPjEhD0/wg986huny04ntzZc7a8Q 9QXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:dkim-signature :delivered-to; bh=bOSATTj7/x0ElTIPN4iAMEIatem/I07vixk8wpoXJKs=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=fJeDTS/BsNKkePmvBhwWy5ua88gJ0rqLSpdu/OY+HsbxRO11stfg/A13n5I160Txk9 Qiyqd5nASbjM9+1Df+63XFlg2iTh4JVy7oQgjjpqbn+zJ9/YXYmer87rDPHOn9J4Pg7o JpJCaISU7CxYAHozd/iQqzYC8r2H6e8mKOEp3CUEAfLY0lswrIp0jnMdYuUP9QxBT5IV UEl4GJG1q0qAZUbWFExxgsMDNy/F4KUr5a1CxkM1Ru9OhPPBohlfHH6cNVrQqj9r2pOh MBtwMJB/7i8TliQ2os0moy/z+0fJO0AQ/xp5iAQK3xTOTHJlNhFg/40axNG2wqb/Ax5Y QGBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=KDrJpoZ3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a86e58ab34esi223140866b.676.2024.08.27.18.15.08; Tue, 27 Aug 2024 18:15:08 -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=@gmail.com header.s=20230601 header.b=KDrJpoZ3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3EE1B68DF21; Wed, 28 Aug 2024 04:08:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 17CC668DEBB for ; Wed, 28 Aug 2024 04:08:53 +0300 (EEST) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a869f6ce2b9so646246466b.2 for ; Tue, 27 Aug 2024 18:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724807332; x=1725412132; darn=ffmpeg.org; h=subject:date:from:to:message-id:from:to:cc:subject:date:message-id :reply-to; bh=dylp6dH6OdQn/HHE88bELTzOF4os18L37jYFeB6b1s0=; b=KDrJpoZ3rqXCJw/FR3MPn7+NtHIqksTNyWVd7TMOj4ErSP/TtPk+N+2G1kuhfUrraL epYl+Dyxy6OgwyLpftDSd3Dh+YwZKTRTiQXqZxRpWxOLgizeOFitWpAOlkW+QQ+JgRHE JuAZdJiwhEhDAZp+44TDRUb8ew06RVxm80uM7NtCddOvgdIBSg1G83DklWUQ+jp9PDPk 94KfdHkhO4Gw5LxvCLsiobFXRj/HVs3x3crAgbkF2gV6vF5tJMpq+i3mrQTK89zOEtFS vPMKqrLJDQfqVSxrpmfYOROBWI/KcZn21HL4elXqiyN06DN71jn7YLiytG711k4VkEXq eqQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724807332; x=1725412132; h=subject:date:from:to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dylp6dH6OdQn/HHE88bELTzOF4os18L37jYFeB6b1s0=; b=HLnXuv1+k22w4UVAhtEy/53+cIlp3JUpz7xgulNrSDsfZ1jeV8jY412yk5juT5Wcmh lRZyw6Th0uOcYuc32gUbrktKrocjmyxAG1+OUlbsXBJRG3UmsM/Ftkf7lKOOJ01Xo42f XoiczNmvg0N+JF68W0+cZbS0xdIqwBPF2CbyDhCeZOJ7/8ziEYcGMAd6QFFV5kiHUl8T zsHiypNVetbRAGYHXgCvGJX/z1mlJGKsBMwEOl6nCOet3r8qUT6Hc0uS5aI+nNIvf09+ mwnkyj2MDUaJTElC/jxRv4XvP55WFfaBZo8KQiPyJLUsQ7HDo/pm0Y8IQCbiTvTYiH3x ueWA== X-Gm-Message-State: AOJu0YwKivmY1l/VeBRksEtZ86eqW/BvfREO0eXZc424/yhn094Yy2mo LQKJ5mLKM1lWQiiqLUGpJE2jVyJAtN3xvP9aMOW5H1UR8quzAbr4gHC6CA== X-Received: by 2002:a17:907:72c7:b0:a86:bb5f:ebbd with SMTP id a640c23a62f3a-a870ab1543bmr38762966b.63.1724807331513; Tue, 27 Aug 2024 18:08:51 -0700 (PDT) Received: from localhost (p200300cccf1178001c6fbf1972c1777c.dip0.t-ipconnect.de. [2003:cc:cf11:7800:1c6f:bf19:72c1:777c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a86e588c4f3sm169475166b.186.2024.08.27.18.08.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Aug 2024 18:08:50 -0700 (PDT) Message-Id: To: From: "Marvin Scholz" Date: Wed, 28 Aug 2024 03:08:39 +0200 Subject: [FFmpeg-devel] [PATCH] lavu/opt: Fix return of uninitialised value 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DFuMDCtUy7J0 In one of the failure paths of av_opt_get_array, the ret variable was accidentally declared again, shadowing the outer one and once when jumping to the fail label would return the still uninitialised outer one. To fix this simply remove the local declaration of ret that shadowed the outer one. Introduced in d89930f8666c563a96f1dc1835b450522b4cd6da Fixes: CID1618663 Uninitialized scalar variable --- libavutil/opt.c | 1 - 1 file changed, 1 deletion(-) base-commit: d89930f8666c563a96f1dc1835b450522b4cd6da diff --git a/libavutil/opt.c b/libavutil/opt.c index d515e20e97..3788a9df75 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -2213,7 +2213,6 @@ int av_opt_get_array(void *obj, const char *name, int search_flags, double num = 1.0; int den = 1; int64_t intnum = 1; - int ret; ret = read_number(o, src, &num, &den, &intnum); if (ret < 0)