|
Message-ID: <20151203202715.GA10401@openwall.com> Date: Thu, 3 Dec 2015 23:27:15 +0300 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: rules.c patch for ASan fault On Thu, Dec 03, 2015 at 02:22:07PM -0600, jfoug wrote: > Is there really a reason for the (int) ?? If not, then simply replace > it with (unsigned char) and be done with it. The compiler will up-cast > the unsigned char from the inner expression into an int before doing the > subtraction, even without the cast. You're right, but I've just committed this with the (int). Arguably, it makes the code and its intent clearer. http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/john/john/src/rules.c.diff?r1=1.27;r2=1.28 revision 1.28 date: 2015/12/03 20:21:55; author: solar; state: Exp; lines: +2 -1 In the 'X' command, handle zero-length memorized strings correctly: avoid undesired integer promotion to let the 'm' variable value (last character position) overflow from 255 back to 0 (length). Thanks to magnum and JimF: http://www.openwall.com/lists/john-dev/2015/12/03/1 Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.