Avoid a call to malloc() that gets passed (size_t)-1. print/lilypond triggers this. Bump PKGREVISION.diff -r1.92 -r1.93 pkgsrc/devel/gtexinfo/Makefile
(wiz)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.92 2016/03/17 05:35:47 richard Exp $ | 1 | # $NetBSD: Makefile,v 1.93 2016/03/20 19:09:53 wiz Exp $ | |
2 | 2 | |||
3 | DISTNAME= texinfo-6.1 | 3 | DISTNAME= texinfo-6.1 | |
4 | PKGNAME= g${DISTNAME} | 4 | PKGNAME= g${DISTNAME} | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= devel sysutils | 6 | CATEGORIES= devel sysutils | |
7 | MASTER_SITES= ${MASTER_SITE_GNU:=texinfo/} | 7 | MASTER_SITES= ${MASTER_SITE_GNU:=texinfo/} | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.gnu.org/software/texinfo/texinfo.html | 10 | HOMEPAGE= http://www.gnu.org/software/texinfo/texinfo.html | |
11 | COMMENT= GNU info documentation utilities | 11 | COMMENT= GNU info documentation utilities | |
12 | LICENSE= gnu-gpl-v3 | 12 | LICENSE= gnu-gpl-v3 | |
13 | 13 | |||
14 | BUILD_DEPENDS+= help2man-[0-9]*:../../converters/help2man | 14 | BUILD_DEPENDS+= help2man-[0-9]*:../../converters/help2man | |
15 | # otherwise, package installs copies of them itself | 15 | # otherwise, package installs copies of them itself | |
16 | DEPENDS+= p5-Locale-libintl-[0-9]*:../../misc/p5-Locale-libintl | 16 | DEPENDS+= p5-Locale-libintl-[0-9]*:../../misc/p5-Locale-libintl | |
17 | DEPENDS+= p5-Text-Unidecode-[0-9]*:../../textproc/p5-Text-Unidecode | 17 | DEPENDS+= p5-Text-Unidecode-[0-9]*:../../textproc/p5-Text-Unidecode | |
18 | DEPENDS+= p5-Unicode-EastAsianWidth-[0-9]*:../../converters/p5-Unicode-EastAsianWidth | 18 | DEPENDS+= p5-Unicode-EastAsianWidth-[0-9]*:../../converters/p5-Unicode-EastAsianWidth |
@@ -1,13 +1,14 @@ | @@ -1,13 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.47 2016/03/17 05:35:47 richard Exp $ | 1 | $NetBSD: distinfo,v 1.48 2016/03/20 19:09:53 wiz Exp $ | |
2 | 2 | |||
3 | SHA1 (texinfo-6.1.tar.gz) = b6ed8b4af3fe9a4aa7c72081dc61f095f73d895c | 3 | SHA1 (texinfo-6.1.tar.gz) = b6ed8b4af3fe9a4aa7c72081dc61f095f73d895c | |
4 | RMD160 (texinfo-6.1.tar.gz) = 6ab09576dab209cf8784c8052039126e0b21d941 | 4 | RMD160 (texinfo-6.1.tar.gz) = 6ab09576dab209cf8784c8052039126e0b21d941 | |
5 | SHA512 (texinfo-6.1.tar.gz) = 633d7b8c6d5001d751ab94eaefe8d6e2562f4ac5952d20fb8629b964fbb8e77c2002124b38b25e4bf5f5fc0a6b59f4618dad161be06b52573717016580cba681 | 5 | SHA512 (texinfo-6.1.tar.gz) = 633d7b8c6d5001d751ab94eaefe8d6e2562f4ac5952d20fb8629b964fbb8e77c2002124b38b25e4bf5f5fc0a6b59f4618dad161be06b52573717016580cba681 | |
6 | Size (texinfo-6.1.tar.gz) = 8951151 bytes | 6 | Size (texinfo-6.1.tar.gz) = 8951151 bytes | |
7 | SHA1 (patch-ab) = 1191eb02e87c51b62f45b8d92ffd124a4d5eda05 | 7 | SHA1 (patch-ab) = 1191eb02e87c51b62f45b8d92ffd124a4d5eda05 | |
8 | SHA1 (patch-ac) = 7f7226ee521fddba9f967be4fe199f6bedcfa148 | 8 | SHA1 (patch-ac) = 7f7226ee521fddba9f967be4fe199f6bedcfa148 | |
9 | SHA1 (patch-gnulib_lib_mbiter.h) = 34c291e6994c6eb51aba803f3ebf5f09d46e9bdd | 9 | SHA1 (patch-gnulib_lib_mbiter.h) = 34c291e6994c6eb51aba803f3ebf5f09d46e9bdd | |
10 | SHA1 (patch-gnulib_lib_mbuiter.h) = be293674c37cb91746527be07aa40acbd285d2f4 | 10 | SHA1 (patch-gnulib_lib_mbuiter.h) = be293674c37cb91746527be07aa40acbd285d2f4 | |
11 | SHA1 (patch-texindex_texindex.awk) = 1f022f1495c951337997036ef1cd758ef9c116a7 | 11 | SHA1 (patch-texindex_texindex.awk) = 1f022f1495c951337997036ef1cd758ef9c116a7 | |
12 | SHA1 (patch-tp_Texinfo_Convert_XSParagraph_configure) = d4557bae4417cd42297bceaa76478b00b3875df3 | 12 | SHA1 (patch-tp_Texinfo_Convert_XSParagraph_configure) = d4557bae4417cd42297bceaa76478b00b3875df3 | |
13 | SHA1 (patch-tp_Texinfo_Convert_XSParagraph_xspara.c) = 198d64b5bc38a3b934ade641c282e8be3e41c4df | |||
13 | SHA1 (patch-util_texi2dvi) = d17608312d4b5546a2295e1be2b193124ad97256 | 14 | SHA1 (patch-util_texi2dvi) = d17608312d4b5546a2295e1be2b193124ad97256 |
$NetBSD: patch-tp_Texinfo_Convert_XSParagraph_xspara.c,v 1.1 2016/03/20 19:09:53 wiz Exp $
Do not call text_append_n with (size_t)-1.
--- tp/Texinfo/Convert/XSParagraph/xspara.c.orig 2016-01-23 11:31:17.000000000 +0000
+++ tp/Texinfo/Convert/XSParagraph/xspara.c
@@ -872,7 +872,7 @@ xspara_add_text (char *text)
{
if (state.space_counter > 0)
{
- /* Truncuate to at most 2 spaces, and replace any
+ /* Truncate to at most 2 spaces, and replace any
'\n' or '\r' characters with ' '. */
TEXT new_space;
@@ -892,12 +892,18 @@ xspara_add_text (char *text)
break;
len = mbrlen (pspace, pspace_left, NULL);
- /* Subtitute newlines in the pending space
+ /* Substitute newlines in the pending space
with spaces. */
if (*pspace == '\n' || *pspace == '\r')
text_append_n (&new_space, " ", 1);
- else
- text_append_n (&new_space, pspace, len);
+ else {
+ if (len > 0) {
+ text_append_n (&new_space, pspace, len);
+ } else {
+ /* skip one character and try again */
+ len = 1;
+ }
+ }
state.space_counter++;
pspace += len;