From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751963AbdHDBEv (ORCPT ); Thu, 3 Aug 2017 21:04:51 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34260 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdHDBEu (ORCPT ); Thu, 3 Aug 2017 21:04:50 -0400 Date: Fri, 4 Aug 2017 10:05:04 +0900 From: Sergey Senozhatsky To: Matthias Kaehlcke Cc: Minchan Kim , 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: <20170804010503.GA6084@jagdpanzerIV.localdomain> 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.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (08/03/17 09:33), 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 Reviewed-by: Sergey Senozhatsky -ss