Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261970AbTGAKTC (ORCPT ); Tue, 1 Jul 2003 06:19:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261989AbTGAKTC (ORCPT ); Tue, 1 Jul 2003 06:19:02 -0400 Received: from hera.cwi.nl ([192.16.191.8]:57795 "EHLO hera.cwi.nl") by vger.kernel.org with ESMTP id S261970AbTGAKTB (ORCPT ); Tue, 1 Jul 2003 06:19:01 -0400 From: Andries.Brouwer@cwi.nl Date: Tue, 1 Jul 2003 12:33:22 +0200 (MEST) Message-Id: To: linux-kernel@vger.kernel.org Subject: blind conversion strncpy -> strlcpy is harmful Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 494 Lines: 11 I notice that people have been replacing strncpy by strlcpy, introducing bugs in the process. It is not true that strlcpy is guaranteed to be better than strncpy. Indeed, strlcpy cannot handle character arrays that are not necessarily 0-terminated. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/