pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

nmh: Add a patch to avoid a possible NULL pointer dereference in mhical



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Aug 17 20:04:55 2017 +0200
Changeset:	de866316121e6e93c56618468a073e41553df386

Modified Files:
	nmh/distinfo
Added Files:
	nmh/patches/patch-uip_mhical.c

Log Message:
nmh: Add a patch to avoid a possible NULL pointer dereference in mhical

(Lesson learned: sometimes being lazy, not reading the man page and then
just try to exit via ^D can be useful!)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=de866316121e6e93c56618468a073e41553df386

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

diffstat:
 nmh/distinfo                   |  1 +
 nmh/patches/patch-uip_mhical.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diffs:
diff --git a/nmh/distinfo b/nmh/distinfo
index d6702ba8f7..e02a3e9d39 100644
--- a/nmh/distinfo
+++ b/nmh/distinfo
@@ -6,3 +6,4 @@ SHA512 (nmh-1.7-RC1.tar.gz) = 533ebc81ebf9070bfc754dc38d97600f18a50f23999b938348
 Size (nmh-1.7-RC1.tar.gz) = 1386731 bytes
 SHA1 (patch-ca) = 8e3d655602d8b508f403e51b105e122818b50b7c
 SHA1 (patch-cd) = 5a775091713bca2597a01fcd267d56e2a175588a
+SHA1 (patch-uip_mhical.c) = b95b92cc4e02a151772757c5ba9b92a20d472c85
diff --git a/nmh/patches/patch-uip_mhical.c b/nmh/patches/patch-uip_mhical.c
new file mode 100644
index 0000000000..29006893b1
--- /dev/null
+++ b/nmh/patches/patch-uip_mhical.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Avoid a possible NULL pointer dereference when mhical does not receive any input
+(e.g. calling it via `mhical < /dev/null').
+
+--- uip/mhical.c.orig	2017-08-02 03:50:07.000000000 +0000
++++ uip/mhical.c
+@@ -714,7 +714,7 @@ display (FILE *file, contentline *clines
+     }
+ 
+     /* Don't call on the END:VCALENDAR line. */
+-    if (clines->next) {
++    if (clines  &&  clines->next) {
+       (void) fmt_scan (fmt, buffer, INT_MAX, dat, NULL);
+       fputs (charstring_buffer (buffer), file);
+       fmt_free (fmt, 1);


Home | Main Index | Thread Index | Old Index