[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bugs #6141] printf(), printf_P() dont check if STDOUT ==
From: |
Joerg Wunsch |
Subject: |
[avr-libc-dev] [bugs #6141] printf(), printf_P() dont check if STDOUT == NULL |
Date: |
Sun, 19 Sep 2004 17:49:24 -0400 |
User-agent: |
Mozilla/5.0 Galeon/1.2.13 (X11; FreeBSD i386; U;) Gecko/0 |
This mail is an automated notification from the bugs tracker
of the project: AVR C Runtime Library.
/**************************************************************************/
[bugs #6141] Latest Modifications:
Changes by:
Joerg Wunsch <address@hidden>
'Date:
Sun 09/19/04 at 21:43 (Europe/Berlin)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Invalid
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
Andreas never responded to my earlier discussion.
I still think it's a pilot error, and penalizing users who
properly ensure they don't pass NULL isn't the right way to
go.
/**************************************************************************/
[bugs #6141] Full Item Snapshot:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=6141>
Project: AVR C Runtime Library
Submitted by: Andreas Becker
On: Fri 10/24/03 at 10:52
Category: Library
Severity: 3 - Ordinary
Item Group: None
Resolution: Invalid
Privacy: Public
Assigned to: joerg_wunsch
Originator Email: address@hidden
Status: Closed
Summary: printf(), printf_P() dont check if STDOUT == NULL
Original Submission: The Functions printf() and printf_P assume, that the
caller allways did a fdevopen() before.
If not, they writing to the registers (printf_P, line 44)
My Solution looks like this:
insert the following code at printf.c:41 and printf_p.c:43.
if (stdout == NULL) {
return EOF;
}
The check in printf.c protects the called vfprintf function.
Follow-up Comments
------------------
-------------------------------------------------------
Date: Sun 09/19/04 at 21:43 By: Joerg Wunsch <joerg_wunsch>
Andreas never responded to my earlier discussion.
I still think it's a pilot error, and penalizing users who
properly ensure they don't pass NULL isn't the right way to
go.
-------------------------------------------------------
Date: Fri 03/12/04 at 21:44 By: Joerg Wunsch <joerg_wunsch>
I still think it's an operator fault rather than a bug.
After all, why penalize all users who do it right, by
introducing additional checks at each invocation? (The
check needs to be done in putc() in order to be useful,
which will imply a high cost.)
For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=6141>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-dev] [bugs #6141] printf(), printf_P() dont check if STDOUT == NULL,
Joerg Wunsch <=