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 DF3B247EC3 for ; Mon, 30 Oct 2023 14:01:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 190B868CC73; Mon, 30 Oct 2023 16:01:23 +0200 (EET) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 514EC68CA45 for ; Mon, 30 Oct 2023 16:01:16 +0200 (EET) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-41cd4450c79so4554071cf.0 for ; Mon, 30 Oct 2023 07:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698674475; x=1699279275; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WZG9lMlDAgGd8e95go8n9mjYlQSGl3TDSe/G8gL/9l8=; b=OTDexAYGis29oDy563EDiP5msj1wwxwX/AOLA7RRXOH1X1R7ZzGZzr1mKRi7/MpVkl /7b6Hg9slERKqobCmyfdtHvMRKpUWiMu/UCaeD5gsvXdfsRi6AzDfzui4ktBdUnh6RtS wWI4P9pkvW0FqVDhXIrlgkFeks+IVEvaT5dC2ZhAzEhFIehZ4+G0lIisLPx/YELxFiOc 4+T95TMaZBKQm1mipUp9J+59WtxLUq7BsmvZvaTGEGRuMpce/WAYUOeNE1BOtxqTMzZ5 S86kDu1UgopI1zdx6dwUAS9CiCIvR9qqsfRFegCdA6kDdfRIpl4uakxm85JnNbm5zVPR bc/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698674475; x=1699279275; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WZG9lMlDAgGd8e95go8n9mjYlQSGl3TDSe/G8gL/9l8=; b=ONjbLBJl+HHCcJuvCBE4u6UznE+jt1M0LAQLUZBNMG+DEdB+4F7HSFCszaCOyZtbPP ie3NrLXnhwMUNxO2MuwxN3XtPMqpza+DmS/5X0ZwZ7W0mWxqdmZ/c9OF/a1r57RvXmXP l30qVFgiYsO3bMbJfO01Bi5N6aI4nQ6FfatTb46BTh3VVc0mAdIwX+quXrGUQZfwBF97 4tvXw2t8lUQ4rWWGGTEyZ0oBJLoQ9HmasZ4ggeMiG3yUrOTo4VMa06w0tmj9BafNJcCO Gbfy0YVCHlBlhFw9Ssit69I09XwFVcfy1+puSSmR8G3jbTImxobAXn9+y+N+TLQjtFLB q3Ig== X-Gm-Message-State: AOJu0YzHyixE25kqjJu3NXndZDMG5D9HDSJfWv8ksKA7gd7kEyDJ0OvW OuX2P4JOrJCtIl7odGgFK8fBUdSF/tzndQ== X-Google-Smtp-Source: AGHT+IETWaRPK5mPbEMjAqhQM248NYo/yBaft4A+tJMJBExJGiohXKQlmmNfNTUJYjphUDYXG8WGiw== X-Received: by 2002:ac8:5f11:0:b0:41c:d433:6c86 with SMTP id x17-20020ac85f11000000b0041cd4336c86mr11424679qta.4.1698674474814; Mon, 30 Oct 2023 07:01:14 -0700 (PDT) Received: from [192.168.1.35] (c-68-56-149-176.hsd1.mi.comcast.net. [68.56.149.176]) by smtp.gmail.com with ESMTPSA id p2-20020ac87402000000b0041cbf113c28sm3422714qtq.40.2023.10.30.07.01.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Oct 2023 07:01:14 -0700 (PDT) Message-ID: Date: Mon, 30 Oct 2023 10:01:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US-large To: ffmpeg-devel@ffmpeg.org References: <20231029124723.398581-1-leo.izen@gmail.com> <8943e8c0-f382-4b54-8761-4ce57866bf5f@gmail.com> <532074f8-ea25-4338-a3c0-f483e4989377@gmail.com> From: Leo Izen In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/hls: use av_strlcopy instead of strncpy 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 10/30/23 09:55, Nicolas George wrote: > Leo Izen (12023-10-30): >>> difference: user data should not be silently truncated. >> There isn't really a bug here, just an extraneous compiler warning. > > Truncating user data silently is a bug. The warning is right and needs > proper fix. > > Regards, > The warning is not that truncation might occur, but that if it does occur, the buffer won't be nul-terminated. This is not actually the case because the size passed to strncpy is one smaller than the buffer size, and the buffer is zeroed. However, the compiler doesn't know this. Also, fwiw, info->assoc_language is the name of a language. It shouldn't actually ever be 63 characters long for real streams in the wild, and truncating it is just a memory-safety precaution. It's not a bug. - Leo Izen _______________________________________________ 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".