From patchwork Thu Nov 16 22:28:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reed Weichler X-Patchwork-Id: 44688 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a20:b0:181:818d:5e7f with SMTP id e32csp200972pzh; Thu, 16 Nov 2023 14:29:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE39PS0xENNWjFgP1JKIrqcQMWh+6WowlvvY5AdKFk4BqpZNy7rPk31ioQmpZKvfqOo/Qkz X-Received: by 2002:a05:6512:360f:b0:509:5d4b:742f with SMTP id f15-20020a056512360f00b005095d4b742fmr10601426lfs.20.1700173741344; Thu, 16 Nov 2023 14:29:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700173741; cv=none; d=google.com; s=arc-20160816; b=e5mtXcbrv+vYqKOErMyABn46TAJCawV2sEX3g8mREt+kmcuh4yoTCu2Urly/ADqdO2 /pUBVCLn7GtCdDr34wpGO95X90yQdinLFWIpMECyhMtQxC8uolu9ZgrOjaKzWJefTItz g78jDhxcmAkFKc2M/Gcu+9NQ1XZ4k5X95JgdMvguYgLuo3CUvnI4IzWemVQEavfUrAjp q8gbGJNuBIG+FIPR2rjdoLuvlWUILlpd2IAKW0LpQgG+Rtgu+R3HnPTQUhhe4x4eahJh 3exs2Z4gMrmb0xur3zZszNwOaA/mhWcO3ITYS2CvUu92uQcjbYTm5MNYK/QhPw81TSvR uClw== 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:to:message-id:date:from:mime-version :dkim-signature:delivered-to; bh=A3j4VQugGtILpHL73erRfzf0ze/mltYqfANyGuJWOUA=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=jEW6QmtbmV67cRwgb56YJY5uKtfyBzkeGUiamQGCTsylHaKDDiAtE0izCICvzYk+wI ZRz2ahBkJiFCeL3fa4nV+ldDKPcr5oEnSDUYA56EokwOWhBc1tdoOCmQXBHZYLF9jojG mvUASqwzXBo4xMmEfP8+AK7axq0ChzcNjTZQ7BGsN7NXrkfygPM0bvIRKNMsINYtIj+K 5kWITtTu/LdfAc84NrhLRrymlY0TMbmk71hsmvmEGlIPS3Vl5c8je7toKhjBGiFxcqhS htPEaRnz9YyozPqgbcWG3Z/3GFxvksSp1v5R7qIORRv/SDviYX0PDc9huvqtcCKrKVcV 4wOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=WFEsmhW7; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s23-20020aa7d797000000b0053d993b1d45si133899edq.373.2023.11.16.14.29.00; Thu, 16 Nov 2023 14:29:01 -0800 (PST) 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=WFEsmhW7; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7AEF468CCCD; Fri, 17 Nov 2023 00:28:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 292D368CBDC for ; Fri, 17 Nov 2023 00:28:50 +0200 (EET) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-1f00b95dc43so695738fac.3 for ; Thu, 16 Nov 2023 14:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700173727; x=1700778527; darn=ffmpeg.org; h=to:subject:message-id:date:from:reply-to:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=hLpF+p/qybSQdyq+AE5vGjTheFDDWewedTc51w0WeQM=; b=WFEsmhW753peAyIgaz+XJliYKWy1m2aAzEkOjGqeGpvMo4dYJ8SZE2ABMkknJ8rcme AEUpkL98K4+7Jf8h9BlLb/SOmTBieUNViDyRpDTPWt6gDvlZ/NMPEo25DEMkfZfiRxsP f4YNQz/wp4K3JmyptUrGWdlglFWI+q39wVtN47B+44mJLTKgW83QmTm9FUrR9bMWzaY6 jom30QiYJCS/t4mBX9+cFd5slwp1z1DiYMyn9KcO22wDxzznWAEGAxwBfUg8NENrectg IsEYAiWeGPqWminbeANoxfI/hZpLgIxH94zkhaBt4YW4RTnq5mE5pZ4VVWof35R93y9D QD4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700173727; x=1700778527; h=to:subject:message-id:date:from:reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hLpF+p/qybSQdyq+AE5vGjTheFDDWewedTc51w0WeQM=; b=SNHcjnJbfzfiekoj6R6hwls2UHYL56acV2G3ZQJq5npSjKtWrwVhy1z0u8fHOo30Ou wHSZZvM09756it3nJmRw3z/Js4mVI3lR5TCAlkRym7IvnX5im27Sr7Xp28F9gYmGmZYL CGn4eYuv678hpAfcTqCB//dbNfUs3009Br0PDWUqY80H6d6rJIidQNmJ+HIjP8Dx85I8 ZUYWcd8yFG6vp6j2TzUMPJu+QTZclk28bzgcLyOmTNpV2IUAaR+sTtZwZrZjpQRBzlUE K8sieI36b8w+ut5lapli7tuyoVk9LTPPN55xNMuTQ35ROneJjQX+XJ4kR23VaVvYxNWH mH9Q== X-Gm-Message-State: AOJu0YySy03ZP1fzpyafKj6nJvR53ECaIZyXODVxo3GM85rJ2jDaZOuR h3gG0cKiVCxhN7axtoK7iSc8PZnWOd9ffcnU9NLCWgPYFgeh X-Received: by 2002:a05:6870:3d85:b0:1e5:89d8:81fb with SMTP id lm5-20020a0568703d8500b001e589d881fbmr23609175oab.10.1700173727354; Thu, 16 Nov 2023 14:28:47 -0800 (PST) MIME-Version: 1.0 From: Reed Weichler Date: Thu, 16 Nov 2023 14:28:31 -0800 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH] cherrypick ab7926341 into 4.2 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: ARCiKRXZ2Mdc pretty self-explanatory. i guess they forgot to cherrypick it when it was first committed. here is my code to repro: https://pastebin.com/raw/yQr3WWvX it needs a FLAC file as input. it hit an EXC_BAD_ACCESS here: https://github.com/FFmpeg/FFmpeg/blob/c6c36aa97a/libavformat/utils.c#L2227 index was equal to -1, so that code shouldnt even run, which usually means undefined behavior --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) int64_t ret; -- 2.42.1 diff --git a/libavformat/utils.c b/libavformat/utils.c index 4067d55fa1..2143d9fb59 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2183,7 +2183,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags) { const AVInputFormat *avif = s->iformat; - int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; + int64_t pos_min = 0, pos_max = 0, pos, pos_limit; int64_t ts_min, ts_max, ts; int index;