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 77D4F45032 for ; Thu, 26 Oct 2023 03:14:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 26E8A68CAF0; Thu, 26 Oct 2023 06:14:39 +0300 (EEST) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6952168C63A for ; Thu, 26 Oct 2023 06:14:32 +0300 (EEST) Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-65b093b97d2so872396d6.0 for ; Wed, 25 Oct 2023 20:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698290070; x=1698894870; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dd0ViuYqIHorNpHPnxazDlP0nx76X1mkMVrUb7fpb5s=; b=azrIrczvJ1Voqwbom0nRXbD6c7Y5r8Lu8tAbylwsMOY9lwKz42KGsVGYS5Ps1g65xm c3D08ZIM2s3oUKJTp2Y3JtYbYPoJBMTw52+ys823CxV4/VBuykoevYziR65JtDEnK6x9 Z9US+OGks5X8lCuvQTHZ1tioFKSFUBAWhFVJgfxigDRmls9OmFByfHvFGiG/cHltfnRa ZGA9VcrlbGlS5Va2f+Hu6Chvw7fgJHiKwEg6tLqHWF7Zf+N8BuLgX6BKuyQFJaB0I+kd blMJ7npD8dEcM/x5FkI6GiZpU0qdSAwRVGeQqzinS+45+CHZ/X+nIjW/JTSGkfbPVhgN fzNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698290070; x=1698894870; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dd0ViuYqIHorNpHPnxazDlP0nx76X1mkMVrUb7fpb5s=; b=mFJVTgQSKLJ3JPQQ5Eeks+fEYSE+C007n0MD+A7BdZm+vkw6GkP46azPKd2ASvMSe+ x+TUsWMZhB3UF7tUt+A20ticWvyWg5t1FIPwdoW/AXTCw1ko8vFvUPSTnU3DsCB1smPy xLRzWdSj2vGVqf8pqDFxmO9w+gKjSJzDL26ujhSFmvohFL5mo64rBcy/kev6LcalC05M qjWhUs4DwK5mPt+dYFQQ4hiIRcrWuT00Jpm2B14/lvnh7YqXX9XAhy1MuDA1y3on2lz2 pNPLYlvdT/nde68elN9UXocnL/WZVIabOfMT/ASlEwfRIX50kopfrpVcHu5mSkBYon1u kFQg== X-Gm-Message-State: AOJu0Yzf0+AMa9+M9mx6RxEOOEo689qsWeun2rFhn7P4gBiCIFTcvTPh zliE9sQMkJeEjq5+4p/+nUrHZwjFjmEkiw== X-Google-Smtp-Source: AGHT+IHMsgQT8bs03w+9akeqE7XH0uZ204yiLRAqhq42Q1JYs16bn6BcK+8RZ7WYxVL7JKJz5RcsKg== X-Received: by 2002:a05:622a:346:b0:41c:cf92:f62e with SMTP id r6-20020a05622a034600b0041ccf92f62emr18870187qtw.3.1698290070332; Wed, 25 Oct 2023 20:14:30 -0700 (PDT) Received: from gauss.local (c-68-56-149-176.hsd1.mi.comcast.net. [68.56.149.176]) by smtp.gmail.com with ESMTPSA id dc6-20020a056214174600b006590d020260sm4910766qvb.98.2023.10.25.20.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 20:14:29 -0700 (PDT) From: Leo Izen To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 Oct 2023 23:14:27 -0400 Message-ID: <20231026031427.150182-1-leo.izen@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] 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 Cc: Leo Izen 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: Avoids a -Wstringop-truncation warning by using av_strlcopy instead of strncpy. Signed-off-by: Leo Izen --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index f5f549b24d..076f92ecfb 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -543,7 +543,7 @@ static struct rendition *new_rendition(HLSContext *c, struct rendition_info *inf int langlen = strlen(rend->language); if (langlen < sizeof(rend->language) - 3) { rend->language[langlen] = ','; - strncpy(rend->language + langlen + 1, info->assoc_language, + av_strlcpy(rend->language + langlen + 1, info->assoc_language, sizeof(rend->language) - langlen - 2); } } -- 2.42.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".