Date: Tue, 20 Oct 2020 17:44:23 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 250489] devel/opencvs: unportable basename(3) usage Message-ID: <bug-250489-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250489 Bug ID: 250489 Summary: devel/opencvs: unportable basename(3) usage Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: danfe@FreeBSD.org Reporter: naddy@FreeBSD.org Flags: maintainer-feedback?(danfe@FreeBSD.org) Assignee: danfe@FreeBSD.org POSIX specifies for basename(3) and dirname(3) that they (1) may modify the string pointed to by path, or (2) may return a pointer to internal storage (and the returned pointer migh= t be invalidated or the storage might be overwritten by a subsequent call). OpenBSD has chosen implementation type (1) and this assumption has leaked i= nto some software written on OpenBSD. By contrast, FreeBSD 12+ has chosen type = (2). OpenCVS is full of basename() and dirname() calls that assume that the argu= ment will not be written to, which runs directly counter to what FreeBSD does. I have now cleaned up the OpenBSD usr.bin/cvs (=3D OpenCVS) code base: https://github.com/openbsd/src/commit/431378d1a7a36c77c1b34ffa43b6933d2ecc9= 70a This patch should also be applied to the FreeBSD devel/opencvs port. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250489-7788>