[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number. |
Date: |
Sun, 19 Sep 2004 13:31:28 +0200 |
User-agent: |
Mutt/1.5.6i |
As Joerg Wunsch wrote:
> I think I see the logical flaw in this now, too. I tried to minimize
> the code required for this check, but obviously opened a window for
> false positives by that.
I tried to really understand what was going on, and debugged it a bit
further. I can now clearly see the problem, and have another
suggested fix (appended). Not only the code is documented better now,
but I'm also saving a few bytes compared to Ted's version.
My version:
% avr-size {.,avr3/,avr4/,avr5/}/build/libc/stdio/vfscanf_std.o
text data bss dec hex filename
1370 0 0 1370 55a ./build/libc/stdio/vfscanf_std.o
1502 0 0 1502 5de avr3//build/libc/stdio/vfscanf_std.o
1256 0 0 1256 4e8 avr4//build/libc/stdio/vfscanf_std.o
1390 0 0 1390 56e avr5//build/libc/stdio/vfscanf_std.o
Ted's version:
% avr-size {.,avr3/,avr4/,avr5/}/build/libc/stdio/vfscanf_std.o
text data bss dec hex filename
1378 0 0 1378 562 ./build/libc/stdio/vfscanf_std.o
1514 0 0 1514 5ea avr3//build/libc/stdio/vfscanf_std.o
1260 0 0 1260 4ec avr4//build/libc/stdio/vfscanf_std.o
1396 0 0 1396 574 avr5//build/libc/stdio/vfscanf_std.o
In comparision, the wrong avr2 version (before the patch) was 1366
bytes long.
If nobody sees a problem with that patch, I'd like to commit it.
--
J"org Wunsch Unix support engineer
Wir stellen aus! Auf der SYSTEMS 2004 vom 18.-22. Oktober in München
Halle B 3, Stand 320-206 (Partner-Stand von Sun Microsystems)
Halle B 2, Stand 605 "Die Musterfirma"
scanf.diff
Description: Text document
- [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., anonymous, 2004/09/16
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., Theodore A. Roth, 2004/09/17
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., Joerg Wunsch, 2004/09/18
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., Theodore A. Roth, 2004/09/18
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't, E. Weddington, 2004/09/19
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't, Joerg Wunsch, 2004/09/19
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't, E. Weddington, 2004/09/20
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number.,
Joerg Wunsch <=
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., Theodore A. Roth, 2004/09/19
- Re: [avr-libc-dev] [bugs #10420] sscanf(), If there is a decimal number followed by the character '_' in the buffer, you can't get the the number., Joerg Wunsch, 2004/09/19