diff options
author | wiz <wiz@pkgsrc.org> | 2016-03-20 19:09:53 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2016-03-20 19:09:53 +0000 |
commit | e68a6e3cb5f3910c4b6da3047a6a417b7d7c3e55 (patch) | |
tree | 44145e32164477ac61bf70a71bf04fd3ee33bab0 /devel | |
parent | e7d30a1fc92203f268f46db618e49cb1164959ab (diff) | |
download | pkgsrc-e68a6e3cb5f3910c4b6da3047a6a417b7d7c3e55.tar.gz |
Avoid a call to malloc() that gets passed (size_t)-1.
print/lilypond triggers this.
Bump PKGREVISION.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/gtexinfo/Makefile | 4 | ||||
-rw-r--r-- | devel/gtexinfo/distinfo | 3 | ||||
-rw-r--r-- | devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c | 37 |
3 files changed, 41 insertions, 3 deletions
diff --git a/devel/gtexinfo/Makefile b/devel/gtexinfo/Makefile index d4d8a9b0f3a..52bacd1e410 100644 --- a/devel/gtexinfo/Makefile +++ b/devel/gtexinfo/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.92 2016/03/17 05:35:47 richard Exp $ +# $NetBSD: Makefile,v 1.93 2016/03/20 19:09:53 wiz Exp $ DISTNAME= texinfo-6.1 PKGNAME= g${DISTNAME} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel sysutils MASTER_SITES= ${MASTER_SITE_GNU:=texinfo/} diff --git a/devel/gtexinfo/distinfo b/devel/gtexinfo/distinfo index 65a38fd5600..a29097f29f8 100644 --- a/devel/gtexinfo/distinfo +++ b/devel/gtexinfo/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.47 2016/03/17 05:35:47 richard Exp $ +$NetBSD: distinfo,v 1.48 2016/03/20 19:09:53 wiz Exp $ SHA1 (texinfo-6.1.tar.gz) = b6ed8b4af3fe9a4aa7c72081dc61f095f73d895c RMD160 (texinfo-6.1.tar.gz) = 6ab09576dab209cf8784c8052039126e0b21d941 @@ -10,4 +10,5 @@ SHA1 (patch-gnulib_lib_mbiter.h) = 34c291e6994c6eb51aba803f3ebf5f09d46e9bdd SHA1 (patch-gnulib_lib_mbuiter.h) = be293674c37cb91746527be07aa40acbd285d2f4 SHA1 (patch-texindex_texindex.awk) = 1f022f1495c951337997036ef1cd758ef9c116a7 SHA1 (patch-tp_Texinfo_Convert_XSParagraph_configure) = d4557bae4417cd42297bceaa76478b00b3875df3 +SHA1 (patch-tp_Texinfo_Convert_XSParagraph_xspara.c) = 198d64b5bc38a3b934ade641c282e8be3e41c4df SHA1 (patch-util_texi2dvi) = d17608312d4b5546a2295e1be2b193124ad97256 diff --git a/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c b/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c new file mode 100644 index 00000000000..5bec457ff46 --- /dev/null +++ b/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c @@ -0,0 +1,37 @@ +$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; |