public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lanurmi at iki dot fi" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/13138] New: scanf crashes on very long numbers
Date: Sun, 28 Aug 2011 11:31:00 -0000	[thread overview]
Message-ID: <bug-13138-131@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-08-28 11:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-28 11:31 lanurmi at iki dot fi [this message]
2011-08-29 11:29 ` [Bug libc/13138] " thomas.jarosch at intra2net dot com
2011-08-29 14:20 ` ppluzhnikov at google dot com
2011-08-29 14:22 ` mpolacek at redhat dot com
2011-09-02 15:07 ` lanurmi at iki dot fi
2011-09-03  5:09 ` bugdal at aerifal dot cx
2011-09-03  6:35 ` lanurmi at iki dot fi
2011-09-10  1:29 ` drepper.fsp at gmail dot com
2014-06-13 14:34 ` fweimer at redhat dot com
2015-02-26  9:21 ` fweimer at redhat dot com
2015-03-04 10:35 ` schwab@linux-m68k.org
2015-03-04 18:52 ` fweimer at redhat dot com
2015-03-04 21:41 ` schwab@linux-m68k.org
2015-03-05  6:26 ` fweimer at redhat dot com
2015-03-05 10:10 ` schwab@linux-m68k.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13138-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).