lkml.org 
[lkml]   [2015]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [oss-security] Re: [PATCH v2 4/4] ozwpan: unchecked signed subtraction leads to DoS
From
On Tue, May 26, 2015 at 4:06 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> You sure do like wrapping to a high value and testing the result for
> wrapping instead of validating before doing the subtraction...

I do indeed. It seems like asking "did it overflow?" is more
straight-forward and easier to read than trying to come up with the
necessary conditions to check for "will it overflow?". Personal
preference, I guess.


\
 
 \ /
  Last update: 2015-05-26 17:21    [W:0.103 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site