From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124665 invoked by alias); 5 Apr 2018 16:14:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 124648 invoked by uid 89); 5 Apr 2018 16:14:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de From: Andreas Schwab To: Stefan Liebler Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Replace strncpy with memccpy to fix -Wstringop-truncation. References: <20180323010729.41457-1-raj.khem@gmail.com> <796d9b52-7270-69d4-cfc2-1ce05b6ebbf1@linux.vnet.ibm.com> X-Yow: I want EARS! I want two ROUND BLACK EARS to make me feel warm 'n secure!! Date: Thu, 05 Apr 2018 16:14:00 -0000 In-Reply-To: <796d9b52-7270-69d4-cfc2-1ce05b6ebbf1@linux.vnet.ibm.com> (Stefan Liebler's message of "Thu, 5 Apr 2018 17:57:49 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-04/txt/msg00145.txt.bz2 On Apr 05 2018, Stefan Liebler wrote: > Why do we need the strncpy at all? > if (len == 0 && ...) That's obviously a typo. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."