From patchwork Sat Jun 19 13:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 28582 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2042:0:0:0:0 with SMTP id z2csp306724iod; Sat, 19 Jun 2021 06:56:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuI7Rhxq192mQKp3KDDbi3AMLQxtLp0lFfr8ZOcARK+w3QfXTSBE8zFgzmoD5soSjFjmRf X-Received: by 2002:a05:6402:5191:: with SMTP id q17mr2267571edd.321.1624111010621; Sat, 19 Jun 2021 06:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624111010; cv=none; d=google.com; s=arc-20160816; b=DcdtjmS/6tVJAGmMBQbsUmgaSFAA10YWyJLikiGBSXXiYXn1Ljp32DrfQnd+FzBKS+ XCuM+2YKVsAFulJf0fmM6sjCCzRYHCrh7QJyZXVCodUcCCPhYL9eIewIbHaLLw/GNZRQ xt51Qcg6zFWtrqa+1yXkIOU8uMlm9rgdvplPAMhF5ugndp/0hNwlCx036ib05y25qrZP zK9W4m/KDwNSBAOfvWQLs7Dl0pmbqPDxigXUm9yBya4Z86dopGzhYxpUgSry4XHy54mC 1VxTPIeZRkCbDBPG0MOK8AAQC608A4BYWsccrl/NicAevKzoi1qzFDSOqnx0ViP847gz eO+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:message-id:date:to:from:delivered-to; bh=GlMRf/yUoyqDxH62buS4UVx5yvHS99VLyIpgLvEUvmI=; b=Em5Igsz+hqK9dCtFYanSSLY0h1zkuMHkbUtGyeYVpW2epRy1LULyFPubTAiHFT/erH eglZA5gnmLBDBo4E4QRJOv1onplBuhMvQyKamVFHhVybCA7aLCCPP2GYEDdw/m5cmh1s e/sctDaflYccbnxk6KlWEgLzEDULOEQV/tATSg0nTwqTTZ4i2ie09bltj9D8XzFJjmWc qX+rlvfxFD/aqndN8wbrjFu3u5ER/EiCqyOZr0Mro21GQ89nqj2cJAeYDDWQnUh529AS awYtF1YIF7olIKgHI89uWHHwnNIEUmrW1ErCkzzs9zUazoxOGKnUGF9RuJj6YqVTiESW k1aQ== ARC-Authentication-Results: i=1; mx.google.com; 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 b14si5395988ejq.311.2021.06.19.06.56.48; Sat, 19 Jun 2021 06:56:50 -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; 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 3318B689A61; Sat, 19 Jun 2021 16:56:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-1.mx.upcmail.net (vie01a-dmta-pe03-1.mx.upcmail.net [62.179.121.160]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C137F680911 for ; Sat, 19 Jun 2021 16:56:37 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1lubSe-003U4y-0Y for ffmpeg-devel@ffmpeg.org; Sat, 19 Jun 2021 15:56:36 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id ubRflyuetljeHubRglRslH; Sat, 19 Jun 2021 15:55:36 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=pGLkceISAAAA:8 a=kdsf5h97teXotO87YyMA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 19 Jun 2021 15:55:35 +0200 Message-Id: <20210619135535.28386-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfLugF4tPxgVpJ125IjFj4pwrjLl3F8VRx8o+acXFiZnyPoRwkEDQquZC0Cy3S4E6v/HC+wBFb3MLZJSQ7XLkFquugTKpFq0xghr6uQwysvHVv+RvL0t+ BDIqER/CJHV1nP3Kspps28ROcTaTr0GQaddqiG6l96iLdKN3G6SyQUTe Subject: [FFmpeg-devel] [PATCH] avcodec/hevc_sei: Use get_bits_long() for time_offset_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: kcPnTq09BzVr Fixes: assertion failure Fixes: crash_1 Found-by: Thuan Pham Signed-off-by: Michael Niedermayer --- libavcodec/hevc_sei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c index c881c4338c..e6ae777852 100644 --- a/libavcodec/hevc_sei.c +++ b/libavcodec/hevc_sei.c @@ -386,7 +386,7 @@ static int decode_nal_sei_timecode(HEVCSEITimeCode *s, GetBitContext *gb) s->time_offset_length[i] = get_bits(gb, 5); if (s->time_offset_length[i] > 0) { - s->time_offset_value[i] = get_bits(gb, s->time_offset_length[i]); + s->time_offset_value[i] = get_bits_long(gb, s->time_offset_length[i]); } } }