From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id DD6AD4F74C for ; Sun, 22 Jun 2025 14:50:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3FF3B68BE1C; Sun, 22 Jun 2025 17:50:52 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id D9FE068A919 for ; Sun, 22 Jun 2025 17:50:44 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-adf34d5e698so903471966b.1 for ; Sun, 22 Jun 2025 07:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750603843; x=1751208643; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=7a0izxZfGhvPSZvopko8TCOj8k4EmZAxPfVlv2s9eAE=; b=RbyWsWj5zXpWM+VkMapcYvRki8d4hjjIIcp4qqbdevQe9c7q1i7aQN94ML03BaNzH1 ejUcejndbqKgwcviYOfsCtDi7Ni0uIbzvSri1zc7f/LPu386nPMxtssnzU9FF9hyw/3q deSHkeF823cKZppql32sfdsl6aWzmCvX68/8PLfbkExM4RY6UjTvE17zI6I9lavMXqi1 1D+p38c+nD5yqfGRxYpKfVIr4IOtKLb269LpvERqLZf76Sn+c+SV2sB73xvDlz6dEc96 JWDOvHjwmTYdfFUZdhoqnh0tSN9VEC73RnaTYH2S4HhgJYqxDinQ9dHzM9WcpwAmCYiB 0oIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750603843; x=1751208643; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7a0izxZfGhvPSZvopko8TCOj8k4EmZAxPfVlv2s9eAE=; b=bOaUfEXQp+E9I4V639DtnVZkJebgYXBzQuko65D8kOXsHqazhar8ET8ibAHImSsMd/ JPTvm6guh0Z0Zc5vBnc78gTiattYBEC4YkCpqRpPtnh/m4qhxZFjhU6F0kPuKK3McyiZ b4TNpJ29LS6jK7b6Y1+/NU01l/usoAZ1Tnj2KdixbC+FkNW0auZINeszTUC2IczNNbMN sZnBEpFc1S88Y0rZhvtImd9ftIVOmXxPKTvYDyQottaICR2cOF4JufPhku/bDtWjfFT6 YSRLJdAdCKt9P68G+eKgUmaWys2x33/KgjFnkQlvoIVEf8zkbCfYli+W7zHGLpelbVOo vnhg== X-Gm-Message-State: AOJu0Yz2NGSnttOZc/lr5eXxJwg9EJtFTBb+ynsH8z5H2tj9RzFYXArt DL+5nwa2CHK9F5IEgw2lETgJt7+P7t5d2f9PmzgHt5PVhD7EoW5p6d+E4yqX7zEiO5zY/dn8rEa 985tEJY5pLbAURWX8nLpZ1Kt+iB95QJp+zuFk X-Gm-Gg: ASbGnctte4X+3A/x+7jF6XTODwFKh4fKt0hqMQGdGvc+JYK3GYD++M5+O1OY1IAjpLF RcjRJi+LcP0b6dY7piLqAqOMqh2KjvGfcN6QkBVMYoeTX+eFWicdSq0hDvWFepLRddrf4mgh00J ESHPq1EjUvm2/uD7UFEEt1crGlnK7VofHIMf1P8Z5c X-Google-Smtp-Source: AGHT+IEgmP6GiGJSn7DaKqSW8DuzYiX2gSZjt5CXdy5ZbVPyqMOWd2Hq5gzvItgFaPJ01aaQPqyQ1xQjHT7IM5zMnvA= X-Received: by 2002:a17:907:3d16:b0:add:fa4e:8a6a with SMTP id a640c23a62f3a-ae05ae1feb9mr837165966b.10.1750603842804; Sun, 22 Jun 2025 07:50:42 -0700 (PDT) MIME-Version: 1.0 References: <20250622134927.1212-1-jamrial@gmail.com> In-Reply-To: <20250622134927.1212-1-jamrial@gmail.com> From: Kacper Michajlow Date: Sun, 22 Jun 2025 16:50:21 +0200 X-Gm-Features: Ac12FXyXvTzl9ncWgP4Yxl7PtAFseakN_kbGHI0573hRVGEWdp_pk7PDFysgbUU Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avcodec/ffv1enc_template: use FF_PTR_ADD to add offsets to a pointer 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: On Sun, 22 Jun 2025 at 15:49, James Almer wrote: > > Fixes: libavcodec\ffv1enc_template.c:75:79: runtime error: applying zero offset to null pointer > Signed-off-by: James Almer > --- > Untested, as gcc-usan on Linux x86_64 doesn't complain about it, but it can be seen in clang-usan also reproduces this on Linux x86_64. > https://fate.ffmpeg.org/report.cgi?time=20250622122557&slot=amd64-clang-cl-msvc-asan > > libavcodec/ffv1enc_template.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/ffv1enc_template.c b/libavcodec/ffv1enc_template.c > index aaf82159ee..7edfd2dc0f 100644 > --- a/libavcodec/ffv1enc_template.c > +++ b/libavcodec/ffv1enc_template.c > @@ -72,7 +72,7 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, > int diff, context; > > context = RENAME(get_context)(f->quant_tables[p->quant_table_index], > - sample[0] + x, sample[1] + x, sample[2] + x); > + sample[0] + x, sample[1] + x, FF_PTR_ADD(sample[2], x)); Doesn't work. FF_PTR_ADD checks offset (x) only, but the issue here is that sample[2]==NULL. - Kacper _______________________________________________ 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".