Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120313135118.GD5728@port70.net>
Date: Tue, 13 Mar 2012 14:51:18 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: scanf %x bug

i found a scanf bug:

#include <stdio.h>
int main(){
    int n, a=7;
    n = sscanf("0", "%x", &a);
    printf("%d %d\n", n, a);
    return 0;
}

prints 0 7
instead of 1 0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.