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 39D4746546 for ; Tue, 20 Jun 2023 14:40:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7AB8668C0E0; Tue, 20 Jun 2023 17:40:51 +0300 (EEST) Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 38CB868BF4B for ; Tue, 20 Jun 2023 17:40:45 +0300 (EEST) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-1ab19a88324so1090418fac.1 for ; Tue, 20 Jun 2023 07:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687272043; x=1689864043; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=GqWY22VxfaRYqc8SnreIzWXjnP2jD2TrCmCplq1q0Jo=; b=fd1VfU3vPGIp1zHgD3QEiVW5Q1LIARJMYkJB2zAw9AYOAFsiHiOmyCBmiNkG6TaahF u0rkZDC58q6xy4iGLq12giz0HVAZ5PwU4HnWX3Lv9RNEfZfmwBqTU93Y/WhpUK+us+Jv PVAFTXhIjpSmL3yR//q+EI0XHtxJjaLYTJnWkfKZonhloukFAneNYSMjqKKb3pWT7EyR bp2EHZRO25/xB9snzNiVku2fo/kSW4g+hZDsWDxyztbY4DVlJVT9CXtR7YYbHfS5hXkr 28LliNYGzwNbeuzOCxyB420dEx4DqA3Tk8nYqpNZmr+6PINOC4CgzPlxgiPpUmB3wKfQ 2hOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687272043; x=1689864043; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GqWY22VxfaRYqc8SnreIzWXjnP2jD2TrCmCplq1q0Jo=; b=LUFti9CfpXTSlPxBoBIJ0KqDERoMc+Gom8LsZoTPdkf5/5j/ZukKNxT6Mu0YJhu9J0 yEYd6ty4sTWDyshLaDS4q0nBq4Z8R2ZeBAptLeByNhcSnSoBeKo6vVblI5c3hjaytkda Ed9B7IWbgedjy2Rsn/cCIxV/VOp+CqwF83MMdWa5SucPvOKQSX59+plkRF6H8/oCSpzz hJDFwhYNdQ85a8KkJ8Nna3YmzWeaXozGkiW2VFuK15nfcUNectEwpnCbDsN0aPustHh2 jO2Gg0FYvnBnMngfcvpaBKqwCnTSgCAgJDqz1AqxzSmjP0m1E6UqPGi10Swb0/6+UGF2 D2/A== X-Gm-Message-State: AC+VfDyyMvd2aVYsujsQj1ZRaPtQ4ybvpFMA0aprMo6MWnL53COKipIi VdKqjr6mC7CFSpkC3x2o/OhkNntLHF0= X-Google-Smtp-Source: ACHHUZ77NeibjtXfLJJbzVRaJYm9KZgGxzTe01ppNn2A3KH+ubIsc908OiXCZtAnoxs8Kz70w/FXyA== X-Received: by 2002:a05:6870:8181:b0:1aa:3563:7676 with SMTP id k1-20020a056870818100b001aa35637676mr2567892oae.4.1687272043341; Tue, 20 Jun 2023 07:40:43 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id nl13-20020a056871458d00b001a69e7efd13sm1417838oab.5.2023.06.20.07.40.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 07:40:42 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 20 Jun 2023 11:40:34 -0300 Message-ID: <20230620144042.9629-1-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/9] avformat/evcdec: ensure there are enough bytes to seekback 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: James Almer --- libavformat/evcdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/evcdec.c b/libavformat/evcdec.c index 890babd3cb..9c4969e78f 100644 --- a/libavformat/evcdec.c +++ b/libavformat/evcdec.c @@ -30,6 +30,7 @@ #include "rawdec.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" @@ -192,8 +193,12 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) } while(!au_end_found) { - uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE]; + + ret = ffio_ensure_seekback(s->pb, EVC_NALU_LENGTH_PREFIX_SIZE); + if (ret < 0) + return ret; + ret = avio_read(s->pb, (unsigned char *)&buf, EVC_NALU_LENGTH_PREFIX_SIZE); if (ret < 0) { av_packet_unref(pkt); -- 2.41.0 _______________________________________________ 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".