Mich, I found a regression in 5.29.If I run stunnel.exe or tstunnel.exe with no arguments, having a configuration file stunnel.conf in the current directory, the program segfaults. This works fine on 5.28 or previous versions. I uploaded a dump file to http://www.osronline.com/page.cfm?name=Analyze and the report pointed to a call to strncpy. Then, I ran a diff between 5.28 and 5.29 sources and this sent me to file options.c, function options_cmdline. I found that in the call strncpy(configuration_file, name, PATH_MAX-1), name was null. The problem is that variable name initialized at the begining of the function is garbled at the end. The following patch fixed the issue for me:
--- options.c.old Tue Dec 22 18:09:39 2015 +++ options.c Mon Jan 04 23:14:29 2016 @@ -272,8 +272,11 @@ } else #endif { - name=arg1; - type=CONF_FILE; + if (arg1) + { + name=arg1; + type=CONF_FILE; + } }
#ifdef HAVE_REALPATH
Regards, Jose A. Diaz
On Monday, January 4, 2016 4:11 PM, Michal Trojnara Michal.Trojnara@mirt.net wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi Guys,
This Friday I intend to release stunnel 5.29.
The planned list of changes:
* New features - New WIN32 icons. - Performance improvement: rwlocks used for locking with pthreads.
* Bugfixes - Compilation fix for *BSD. - Fixed configuration file reload for relative stunnel.conf path on Unix. - Fixed ignoring CRLfile unless CAfile was also specified (thx to Strukov Petr).
Feel free to try stunnel 5.29b3, so I can fix any discovered issues before the final release: https://www.stunnel.org/downloads.html
Best regards, Mike
_______________________________________________ stunnel-users mailing list stunnel-users@stunnel.org https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users