Received: by mail.netbsd.org (Postfix, from userid 605) id 99D3F84DEF; Thu, 4 Jul 2019 13:27:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 20C3284DEB for ; Thu, 4 Jul 2019 13:27:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id eRlyK5Me4WNn for ; Thu, 4 Jul 2019 13:26:59 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 7FE6D84CD8 for ; Thu, 4 Jul 2019 13:26:59 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 7DFBBFBF4; Thu, 4 Jul 2019 13:26:59 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1562246819239520" MIME-Version: 1.0 Date: Thu, 4 Jul 2019 13:26:59 +0000 From: "Ryo ONODERA" Subject: CVS commit: pkgsrc/graphics/libotf To: pkgsrc-changes@NetBSD.org Reply-To: ryoon@netbsd.org X-Mailer: log_accum Message-Id: <20190704132659.7DFBBFBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1562246819239520 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: ryoon Date: Thu Jul 4 13:26:59 UTC 2019 Modified Files: pkgsrc/graphics/libotf: Makefile distinfo pkgsrc/graphics/libotf/patches: patch-example_otfview.c Log Message: Bump PKGREVISION * Use 1024 instead of NAME_MAX. NAME_MAX is not defined OmniOS-derived OS and MAXNAMELEN is not portable too, _POSIX_NAME_MAX is too short. Discussed with tron@. * Simplyfy my previous code to fix overrun To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 pkgsrc/graphics/libotf/Makefile cvs rdiff -u -r1.12 -r1.13 pkgsrc/graphics/libotf/distinfo cvs rdiff -u -r1.2 -r1.3 \ pkgsrc/graphics/libotf/patches/patch-example_otfview.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1562246819239520 Content-Disposition: inline Content-Length: 3854 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/graphics/libotf/Makefile diff -u pkgsrc/graphics/libotf/Makefile:1.18 pkgsrc/graphics/libotf/Makefile:1.19 --- pkgsrc/graphics/libotf/Makefile:1.18 Wed May 29 12:29:00 2019 +++ pkgsrc/graphics/libotf/Makefile Thu Jul 4 13:26:59 2019 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.18 2019/05/29 12:29:00 ryoon Exp $ +# $NetBSD: Makefile,v 1.19 2019/07/04 13:26:59 ryoon Exp $ DISTNAME= libotf-0.9.16 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://download.savannah.gnu.org/releases/m17n/ Index: pkgsrc/graphics/libotf/distinfo diff -u pkgsrc/graphics/libotf/distinfo:1.12 pkgsrc/graphics/libotf/distinfo:1.13 --- pkgsrc/graphics/libotf/distinfo:1.12 Wed May 29 12:54:10 2019 +++ pkgsrc/graphics/libotf/distinfo Thu Jul 4 13:26:59 2019 @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.12 2019/05/29 12:54:10 ryoon Exp $ +$NetBSD: distinfo,v 1.13 2019/07/04 13:26:59 ryoon Exp $ SHA1 (libotf-0.9.16.tar.gz) = ee3037f468a5381de89846ee1c78320964cfbf78 RMD160 (libotf-0.9.16.tar.gz) = ddea1124409fa97a58386251aa70b961c11b9374 SHA512 (libotf-0.9.16.tar.gz) = 0f68c45c1224f02dc0f1a8e9915dd9c1c70d71259b4e2f7bbd4fbec6426e58d4a26e4cbf28dbb8ed051ba6f532f99fc4e74b4ddf97a93ec947fa6260c875d0b4 Size (libotf-0.9.16.tar.gz) = 423979 bytes SHA1 (patch-configure) = 5d43a445f6950ac14e5a91f37b25601d951868c2 -SHA1 (patch-example_otfview.c) = db34c8354a3af3615b144adabf32f0d9e8717ab0 +SHA1 (patch-example_otfview.c) = f5ddb893c447b1bfebe0a1fd49aae6daac45edad Index: pkgsrc/graphics/libotf/patches/patch-example_otfview.c diff -u pkgsrc/graphics/libotf/patches/patch-example_otfview.c:1.2 pkgsrc/graphics/libotf/patches/patch-example_otfview.c:1.3 --- pkgsrc/graphics/libotf/patches/patch-example_otfview.c:1.2 Wed May 29 12:54:10 2019 +++ pkgsrc/graphics/libotf/patches/patch-example_otfview.c Thu Jul 4 13:26:59 2019 @@ -1,37 +1,40 @@ -$NetBSD: patch-example_otfview.c,v 1.2 2019/05/29 12:54:10 ryoon Exp $ +$NetBSD: patch-example_otfview.c,v 1.3 2019/07/04 13:26:59 ryoon Exp $ * Fix a runtime crash on NetBSD. --- example/otfview.c.orig 2015-09-02 13:39:25.000000000 +0000 +++ example/otfview.c -@@ -28,6 +28,7 @@ write to the Free Software Foundation, I - #include - #include - #include -+#include +@@ -51,6 +51,8 @@ write to the Free Software Foundation, I - #include "config.h" - #ifdef HAVE_ALLOCA_H -@@ -1603,7 +1604,10 @@ ExposeProc (Widget w, XEvent *event, Str + #include + ++#define MY_NAME_MAX 1024 ++ + #define CAST_FROM_XTPOINTER(TYPE, DATA, VAR) \ + do { \ + long TYPE temp = (long TYPE) (DATA); \ +@@ -1603,7 +1605,9 @@ ExposeProc (Widget w, XEvent *event, Str { XTextProperty text_prop; char *pname = "otfview"; - char *fname = basename (filename); + char *tmpfname = basename (filename); -+ size_t len = strlen(tmpfname); -+ char fname[NAME_MAX]; -+ snprintf(fname, len + 1, "%s", tmpfname); ++ char fname[MY_NAME_MAX]; ++ snprintf(fname, sizeof(fname), "%s", tmpfname); char *name = alloca (strlen (fname) + 3 + strlen (pname) + 1); sprintf (name, "%s - %s", pname, fname); -@@ -1735,7 +1739,9 @@ main (int argc, char **argv) +@@ -1735,9 +1739,11 @@ main (int argc, char **argv) char title[256]; Arg arg[1]; - filename = basename (filename); + char *tmpfilename = basename (filename); -+ size_t len = strlen(tmpfilename); -+ snprintf(filename, len + 1, "%s", tmpfilename); ++ char fname[MY_NAME_MAX]; ++ snprintf(fname, sizeof(fname), "%s", tmpfilename); sprintf (title, "%s family:%s style:%s", - filename, face->family_name, face->style_name); +- filename, face->family_name, face->style_name); ++ fname, face->family_name, face->style_name); XtSetArg (arg[0], XtNtitle, title); + XtSetValues (shell, arg, 1); + } --_----------=_1562246819239520--