Opened 10 years ago

#299 new defect

freopen() returns NULL even if it is successful

Reported by: KO Myung-Hun Owned by:
Priority: normal Milestone: libc-0.7
Component: libc Version: 0.6.5
Severity: normal Keywords:
Cc:

Description

Hi/2.

Like the subject, freopen() returns NULL even if it is successful if filename is NULL.

For examples,

    FILE *fp = freopen( NULL, "rb", stdin );

fp is set to NULL. However, stdin is changed to binary mode correctly.

Attachments (2)

freopen.c (1.5 KB ) - added by KO Myung-Hun 10 years ago.
Test case for freopen()
freopen.diff (629 bytes ) - added by KO Myung-Hun 10 years ago.
patch for freopen()

Download all attachments as: .zip

Change History (2)

by KO Myung-Hun, 10 years ago

Attachment: freopen.c added

Test case for freopen()

by KO Myung-Hun, 10 years ago

Attachment: freopen.diff added

patch for freopen()

Note: See TracTickets for help on using tickets.