NetBSD Problem Report #50547

From www@NetBSD.org  Sun Dec 13 16:59:20 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 677B57ABDF
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Dec 2015 16:59:20 +0000 (UTC)
Message-Id: <20151213165919.8854D7ACA9@mollari.NetBSD.org>
Date: Sun, 13 Dec 2015 16:59:19 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/usr.sbin/sup/source/expand.c: 2 * possible bad size ?
X-Send-Pr-Version: www-1.0

>Number:         50547
>Category:       bin
>Synopsis:       src/usr.sbin/sup/source/expand.c: 2 * possible bad size ?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 13 17:00:00 +0000 2015
>Closed-Date:    Sun Dec 13 19:16:36 +0000 2015
>Last-Modified:  Sun Dec 13 19:16:36 +0000 2015
>Originator:     David Binderman
>Release:        cvs dated 20151210
>Organization:
>Environment:
>Description:
[src/usr.sbin/sup/source/expand.c:136]: (warning) Size of pointer 'path' used instead of size of its data.

  strncpy(path, path + 1, sizeof path - 1);

Similar thing a few lines later

[src/usr.sbin/sup/source/expand.c:138]: (warning) Size of pointer 'path' used instead of size of its data.

  strncpy(path, (char *) getenv("HOME"), sizeof path - 1);
            path[sizeof path - 1] = '\0';

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50547 CVS commit: src/usr.sbin/sup/source
Date: Sun, 13 Dec 2015 13:14:13 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sun Dec 13 18:14:13 UTC 2015

 Modified Files:
 	src/usr.sbin/sup/source: expand.c

 Log Message:
 PR/50547: David Binderman: fix bad sizeof


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sup/source/expand.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 Dec 2015 19:16:36 +0000
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.