Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751702AbdGRLwd (ORCPT ); Tue, 18 Jul 2017 07:52:33 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33256 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbdGRLwb (ORCPT ); Tue, 18 Jul 2017 07:52:31 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170714120720.906842-1-arnd@arndb.de> <20170714120720.906842-21-arnd@arndb.de> From: Arnd Bergmann Date: Tue, 18 Jul 2017 13:52:30 +0200 X-Google-Sender-Auth: 2U6VeNM2GNESm8uIpf4kniRPI5g Message-ID: Subject: Re: [PATCH 20/22] sound: pci: avoid string overflow warnings To: Takashi Iwai Cc: Jaroslav Kysela , Linux Kernel Mailing List , alsa-devel@alsa-project.org, "David S . Miller" , Geliang Tang , "the arch/x86 maintainers" , Andrew Morton , Linus Torvalds , "James E . J . Bottomley" , Greg Kroah-Hartman , "Martin K . Petersen" , Guenter Roeck , Takashi Sakamoto , linux-scsi , Networking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 752 Lines: 19 On Fri, Jul 14, 2017 at 2:28 PM, Takashi Iwai wrote: > On Fri, 14 Jul 2017 14:07:12 +0200, > > Thanks for the patch. I have seen it but ignored, so far, as not sure > which action is the best. An alternative solution is to use > snprintf() blindly, for example. > > For mixart, it's even better to drop mgr->shortname[] and longname[] > assignment. The shortname is the fixed string, and the longname is > used only at copying to card->longname, so we can create a string > there from the scratch. I've done that now, and tried to be a little smarter with the other conversions. I also found related problems in ISA drivers after randconfig testing and fixed those as well. Sent a 7-patch series now as a replacement. Arnd