nmh-workers
[Top] [All Lists]

[Nmh-workers] mhical vs /dev/null (possible NULL pointer dereference)

2017-08-17 13:23:27
Hello to the entire nmh community!
Today I've finally received an email with an `.ics' and so I've
used the new `mhical'. After running it via `mhical' I've figured
out that it expected an ics file as input and after just pressing
^D I've found that mhical wasn't happy about an empty input.

To reproduce it:

 % ./mhical < /dev/null
 Segmentation fault (core dumped)
 Exit 139
 % gdb -core ./mhical.core ./mhical
 Reading symbols from ./mhical...done.
 [New process 1]
 Core was generated by `mhical'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  display (nfs=<optimized out>, clines=0x0, file=0x623a98 <__sF+152>) at 
uip/mhical.c:717
 717         if (clines->next) {
 (gdb) quit

I'll attach in this email a possible trivial patch that should fix
this issue.
I have verified that it applies cleanly both to latest git version and
1.7RC1 (IMHO it's a good idea to apply it for 1.7 too).


Thank you for the attention and keep up the good work!

Attachment: patch-uip_mhical.c
Description: patch-uip_mhical.c

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>