From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbdHDBLR (ORCPT ); Thu, 3 Aug 2017 21:11:17 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:51967 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdHDBLQ (ORCPT ); Thu, 3 Aug 2017 21:11:16 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Fri, 4 Aug 2017 10:11:13 +0900 From: Minchan Kim To: Matthias Kaehlcke , Andrew Morton Cc: Nitin Gupta , Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Doug Anderson , Nick Desaulniers Subject: Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store() Message-ID: <20170804011113.GB8368@bbox> References: <20170803163350.45245-1-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170803163350.45245-1-mka@chromium.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 03, 2017 at 09:33:50AM -0700, Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can be done safely since the function ensures that the string > in the source buffer is terminated. > > Signed-off-by: Matthias Kaehlcke Acked-by: Minchan Kim Thanks.