NetBSD Problem Report #52982

From www@NetBSD.org  Tue Feb  6 16:31:02 2018
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 47E027A166
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  6 Feb 2018 16:31:02 +0000 (UTC)
Message-Id: <20180206163100.ECC577A221@mollari.NetBSD.org>
Date: Tue,  6 Feb 2018 16:31:00 +0000 (UTC)
From: lists@eitanadler.com
Reply-To: lists@eitanadler.com
To: gnats-bugs@NetBSD.org
Subject: [libnbcompat] fix bug in __glob13.c
X-Send-Pr-Version: www-1.0

>Number:         52982
>Category:       lib
>Synopsis:       [libnbcompat] fix bug in __glob13.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 06 16:35:00 +0000 2018
>Last-Modified:  Fri Apr 12 16:16:36 +0000 2019
>Originator:     Eitan Adler
>Release:        HEAD
>Organization:
>Environment:
>Description:

>How-To-Repeat:

>Fix:
Index: __glob13.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/__glob13.c,v
retrieving revision 1.4
diff -u -r1.4 __glob13.c
--- __glob13.c	14 Mar 2014 22:08:17 -0000	1.4
+++ __glob13.c	6 Feb 2018 16:29:38 -0000
@@ -594,8 +594,9 @@
 	 * we save one character so that we can use ptr >= limit,
 	 * in the general case when we are appending non nul chars only.
 	 */
-	return(glob2(pathbuf, pathbuf, pathbuf + sizeof(pathbuf) - 1, pattern,
-	    pglob, limit));
+	return glob2(pathbuf, pathbuf,
+		pathbuf + (sizeof(pathbuf) / sizeof(*pathbuf)) - 1, pattern,
+		pglob, limit);
 }

 /*

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: lib-bug-people->eadler
Responsible-Changed-By: eadler@NetBSD.org
Responsible-Changed-When: Sun, 04 Mar 2018 21:51:06 +0000
Responsible-Changed-Why:
Take

Responsible-Changed-From-To: eadler->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Sun, 04 Mar 2018 22:27:09 +0000
Responsible-Changed-Why:
Testing eadler's script

Responsible-Changed-From-To: pgoyette->eadler
Responsible-Changed-By: eadler@NetBSD.org
Responsible-Changed-When: Sun, 04 Mar 2018 22:29:10 +0000
Responsible-Changed-Why:
Take

Responsible-Changed-From-To: eadler->bin-bugs-people
Responsible-Changed-By: eadler@NetBSD.org
Responsible-Changed-When: Wed, 20 Feb 2019 05:24:56 +0000
Responsible-Changed-Why:
no time right now


From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52982 CVS commit: pkgsrc/pkgtools/libnbcompat/files
Date: Wed, 20 Feb 2019 09:44:24 -0500

 Module Name:	pkgsrc
 Committed By:	christos
 Date:		Wed Feb 20 14:44:24 UTC 2019

 Modified Files:
 	pkgsrc/pkgtools/libnbcompat/files: __glob13.c

 Log Message:
 PR/52982: Eitan Adler: fix incorrect bounds computation.
 XXX: really we need to sync with the libc glob.c


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/libnbcompat/files/__glob13.c

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

Responsible-Changed-From-To: bin-bugs-people->bin-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Fri, 12 Apr 2019 16:16:36 +0000
Responsible-Changed-Why:
use right address


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.