https://bugzilla.novell.com/show_bug.cgi?id=222530
Summary: inconsistent sscanf %d parsing
Product: SUSE LINUX 10.0
Version: Final
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Development
AssignedTo: pth@novell.com
ReportedBy: matthias.andree@gmx.de
QAContact: qa@suse.de
sscanf parsing %d is inconsistent between 32 and 64 bit modes WRT overflow
handling:
ma@host:~> gcc -m64 -O -otry try.c
ma@host:~> ./try
n=1, i=-1, errno=34/Numerical result out of range
n=1, i=-1, errno=0/Success
n=1, i=2147483647, errno=0/Success
ma@host:~> gcc -m32 -O -otry try.c
ma@host:~> ./try
n=1, i=2147483647, errno=34/Numerical result out of range
n=1, i=2147483647, errno=34/Numerical result out of range
n=1, i=2147483647, errno=0/Success
ma@host:~> cat try.c
#include