This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13138] New: scanf crashes on very long numbers
- From: "lanurmi at iki dot fi" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sun, 28 Aug 2011 11:30:32 +0000
- Subject: [Bug libc/13138] New: scanf crashes on very long numbers
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13138
Bug #: 13138
Summary: scanf crashes on very long numbers
Product: glibc
Version: unspecified
Status: NEW
Severity: critical
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: lanurmi@iki.fi
Classification: Unclassified
As pointed out by someone at
<http://marc.info/?l=gimp-developer&m=129567990905823&w=2>, the scanf
implementation of glibc will crash when given input containing a lot of digits.
This is the sample code copied from the post mentioned above:
#include <stdio.h>
int main()
{
int a;
scanf("%i", &a);
return 0;
}
Expected output none; actual output:
$ perl -e 'print "5"x21000000' | ./a.out
Segmentation fault
Tested and reproduced on:
RHEL 5.7 (x86_64)
Debian Squeeze (armv5tel)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.