From patchwork Sun May 26 23:52:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49291 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:542:0:b0:460:55fa:d5ed with SMTP id 63csp2959081vqf; Sun, 26 May 2024 16:55:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW87IltIA7WxVRc4frczcCdGSfal6ITjjq21uFVDvvGNeJha366crftoJ7MOOCYVbVy/ZA5skfEmTltHZbwkZ4I/8B+6dxZiheU5Q== X-Google-Smtp-Source: AGHT+IFnzzCQRWvFIKJkN4M2hbuMWqhNa7nC1OWzI2VlvsMr2Y1owDqyMPhmGthaThF6T172Efuf X-Received: by 2002:a05:600c:198e:b0:420:fe60:c387 with SMTP id 5b1f17b1804b1-42108a12ab4mr63390975e9.38.1716767703188; Sun, 26 May 2024 16:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716767703; cv=none; d=google.com; s=arc-20160816; b=wVaILwIjGkx40TE7s5ggHwLyIalKWvwGK8NpSu4yPHfG68+mIbAa8Ix7FYwF6e5uWR FxnL7VGdaUfmNihI5kx7PUCPPC7rhvFa9yCabihKOZ00VhjIulV4szvl/tiAx6UrWDF/ jo8YqWnMQG/OAD4WXSv7tN1nnJufzfH1f1iOH3qG5O47dzJyCk3s9UO99mGMQgYsowC5 LKY+qnS0WnjVcJGwdEr9K/Tme3MhHPlRBSF5CZgj42cBoTmJgAKVPBVFfKrRueI/2FXR vYZ0TE7zWSCdTu3o5Ce87qmUCfnkmnGmtarIjpfvaK2bEbXtkqTnlgCG8sciDRvFvf9Z XM0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=DWITOTp2zFJecdgOi9gtP7FLb5JQoG7Pk+/4b6ff5QE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=0QVi52hwcfTgblDka+rfXWA0IxZPdu42N0s6TluVPxNb4KGjmhxc0Vxgrblz5RkVcj VM1RTN6DWaeFJGp6l9i/9vN2PcrUbUI2WhvltFxMhmQw/opYVSTRqbHBhBF/mGUn2cYg 2oqHewC2rAKnsvB6MW7VCUZ3/gBkfQ9f7Tf2aRUxrwatFyU4wTeIQRL//dkIyk6hqm3U ts9qGR3incGQQMLc60tzYju2hwyeVIFaYPgN99nbwMKy4nzmlUHJIKOnwOkkXieC3Bhg Ct7zzl4C/HPRCFB/CLz9fleW9I8aCvLiR8tor0JPb6aLx6Q5w5w6wIg//AwpDzovsDww dgoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="dgbLSk/M"; 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 a640c23a62f3a-a626c918c02si313621866b.249.2024.05.26.16.55.02; Sun, 26 May 2024 16:55:03 -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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="dgbLSk/M"; 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 28B9768D5F1; Mon, 27 May 2024 02:53:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E33E868D591 for ; Mon, 27 May 2024 02:52:45 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D4AC240003 for ; Sun, 26 May 2024 23:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716767565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8JSV8jHahvWgMWcv5+JtDiOCqhbRl7A3UHYxPZVN0kI=; b=dgbLSk/M/eaDp8rBXF1f4cQ0lH3V6GANtyZeapgUtZT7hqWW9EdqaZvN2gcD36PQO24/Y8 kJRAcOabceUvIpA0PBk1Rt2qfbdh5rbl8JkEiI+qs14rbmC0OsmPYW8M88p8wgfrTEae4K T1nObgzJaKj6/v4sx3D3Vs+eUkUay7bgWlBol3/swrUASDRhARidTUVrvYsSqnn8u1aPZ7 Va5ojFWM/3+DcqlBKhCjDZE/tiWXaqX0c05VUb07UbLl+Xe1r5SqaGAjKIFfbD2X5JB1PY 0kjjYOr93NEkceYLXxgPvtqTrsvyWCxdCjW/0OM/ZUbRsvl0NhP0TUx9RitUxQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 27 May 2024 01:52:29 +0200 Message-ID: <20240526235230.2876318-17-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240526235230.2876318-1-michael@niedermayer.cc> References: <20240526235230.2876318-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 17/17] avdevice/dshow_filter: Use wcscpy_s() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: rzP1C9rY/4W7 Fixes: CID1591929 Copy into fixed size buffer Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavdevice/dshow_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/dshow_filter.c b/libavdevice/dshow_filter.c index 4642ac077c5..2122c846262 100644 --- a/libavdevice/dshow_filter.c +++ b/libavdevice/dshow_filter.c @@ -135,7 +135,7 @@ long WINAPI ff_dshow_filter_JoinFilterGraph(DShowFilter *this, IFilterGraph *gra this->info.pGraph = graph; if (name) - wcscpy(this->info.achName, name); + wcscpy_s(this->info.achName, sizeof(this->info.achName) / sizeof(wchar_t), name); return S_OK; }