The attached patch (based on the one in Fedora 20 and Tavis Ormandy's patch at http://www.openwall.com/lists/oss-security/2014/09/03/8) fixes CVE-2014-3618. I've not managed to repeat the crash in Fedora's bug report #1121299, but the code definitely overflows the buffer.
Created attachment 147218 [details] Patch
over to maintainer
It's fixed in r368009 (head) and r368028 (2014Q3). Thanks!