Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 3 Dec 2015 23:27:15 +0300
From: Solar Designer <>
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.;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:


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.