Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp271437pxj; Fri, 14 May 2021 03:06:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX1kjVpQxMSRjNWFUUt05/CmCNlMkxcj93mGNdzlDd/fsrFN+xHKib8wa1bnoEhjn9yWl8 X-Received: by 2002:a92:6e01:: with SMTP id j1mr14257219ilc.160.1620986792207; Fri, 14 May 2021 03:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620986792; cv=none; d=google.com; s=arc-20160816; b=G2ZWOZ6auxZdXJ1FuXAMKVkKu77M3oKdDHzwTwWpsdbvXAsF/DzsmdAY46IRCOvqb7 9dDEHx0wHQuoWcTtPzau4NXXA8gvQ42zZyYPMmekRG5nzPSIjAr3WdU29u8DsCDkY48W HWh1iVMRgKN/wnok5IATgCyCD7i8ZIAFBskY83zUj3hTxDDj+TcFTKTcdiyhI0k91Ky9 9b9VzrK6YnMNur7THrvulQRsBZPATVxDmUq2Svi4jQNYT0AVTnMuM9nCbQeamBO3yy81 bCgU9hoYdmY3VZG3ElBYV8XgKVxIBL/1Y9i3hGbVDK7exYzqSalaky+FjW0YCp0fBJZi kRaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=rq5EjzEZhjmGoB7BwPI/S209+0tmbVmuaG92KVnV3U4=; b=V6Ab0/o1iyuAAJGzojr3lVDWX1gqZYdWTYcVrCIFwpvDt/PEr15Sfq3j8WTxrcnIsO DYsw55NLug62Utd5LNeXRDOHwQxrzcRhpHFOQO13VAmV5q5PFdxKeGI10/DwSLGuq//w ccmeW9SSwA40qUENRHbBETrhT508UFqHBaBX6C2oajx1uBlBZ06bmgQA+pZrnE4EgRjs 0DOs6gWuHqcdBoi9pgAEqNBZcG3H+OfNdaiiN5ndu51jPZGXcg33Qr3NueE0XWD9+QK5 Le9kUm0s7FRfFQSAu3th5CB1HoRzmeqXn8gD8b0IVwdsk8J18KCLlRLgGzAjqkFSjZ1Q c2OA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w135si7575682jaw.24.2021.05.14.03.06.20; Fri, 14 May 2021 03:06:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232870AbhENHsV (ORCPT + 99 others); Fri, 14 May 2021 03:48:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:59874 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbhENHsV (ORCPT ); Fri, 14 May 2021 03:48:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9ABC9B14A; Fri, 14 May 2021 07:47:09 +0000 (UTC) Date: Fri, 14 May 2021 09:47:09 +0200 Message-ID: From: Takashi Iwai To: YueHaibing Cc: , , , , Subject: Re: [PATCH -next] ALSA: gus: Replace unsafe strcpy() with strscpy() In-Reply-To: <20210514070507.16600-1-yuehaibing@huawei.com> References: <20210514070507.16600-1-yuehaibing@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 May 2021 09:05:07 +0200, YueHaibing wrote: > > Fix smatch warning: > sound/isa/gus/gus_main.c:396 snd_gus_check_version() error: > strcpy() 'card->longname' too large for 'card->shortname' (80 vs 32) > > Even if this is not a real bug since the longest length of card->longname > now is 31, replace strcpy() with strscpy() in order to avoid possible > future mistake. > > Signed-off-by: YueHaibing Applied, thanks. Takashi