avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #6141] printf(), printf_P() dont check if STDOUT ==


From: nobody
Subject: [avr-libc-dev] [bug #6141] printf(), printf_P() dont check if STDOUT == NULL
Date: Fri, 24 Oct 2003 06:52:46 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010923

=================== BUG #6141: FULL BUG SNAPSHOT ===================
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=6141&group_id=2140

Submitted by: andreas_becker          Project: AVR C Runtime Library        
Submitted on: Fri 10/24/2003 at 10:52
Category:  Library                    Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Originator Email:  address@hidden
Status:  Open                         

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.





No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=6141&group_id=2140

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]