lkml.org 
[lkml]   [2019]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 2/6] lib: scanf: handle integer overflows in vsscanf
On Sun, Mar 10, 2019 at 2:06 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> IIRC, this has been attempted before, causing a userspace regression
> because some sysfs/procfs file matched with %u or %x, and somebody wrote
> -1 to get 0xffffffff .

.. which is correct anyway. That's how scanf is supposed to work.

If somebody needs overflow checking, they shouldn't be using scanf.

Linus

\
 
 \ /
  Last update: 2019-03-10 22:53    [W:0.070 / U:15.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site