[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47759] scanf should return min/max value on i
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #47759] scanf should return min/max value on integer range overflow |
Date: |
Tue, 26 Apr 2016 17:20:24 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Follow-up Comment #2, bug #47759 (project octave):
I tried an mxe-build with your patch on Windows 10 with the following
results:
>> format long
>> [x, count, errmsg] = sscanf('9999999999', '%d')
x = 2147483647
count = 1
errmsg =
>> [x, count, errmsg] = sscanf('fffffffff', '%x')
x = 4294967295
count = 1
errmsg =
>> [x, count, errmsg] = sscanf('9999999999999999999', '%ld')
x = 9223372036854775808
count = 1
errmsg =
>> [x, count, errmsg] = sscanf('fffffffffffffffff', '%lx')
x = 1.84467440737096e+019
count = 1
errmsg =
So the original issue seems to be solved with your patch.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47759>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/