lkml.org 
[lkml]   [2015]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lib/kstrtox.c clean kstrtoll function
On Thu, Jan 22, 2015 at 05:54:10AM -0800, Anshul Garg wrote:
> - if ((long long)(-tmp) >= 0)
> - return -ERANGE;
> - *res = -tmp;
...
> + if ((long long)tmp < 0)
> + return -ERANGE;
> + *res = sign * tmp;

I don't believe overflow handling is correct anymore with this patch.
Did you try with the input as the most negative possible unsigned long?

Jeff


\
 
 \ /
  Last update: 2015-01-22 18:41    [W:0.233 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site