Opened 2 years ago

Closed 2 years ago

#17636 closed bug (fixed)

fgetws function crashes the program if less than num - 1 characters are present in the current line

Reported by: Cacodemon345 Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: System/libroot.so Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

If the current line being read by fgetws has less than num - 1 characters present in the current line (where num is the number of wide-characters requested in the 2nd argument) and an additional line comes after it, fgetws will cause the program to crash. This doesn't happen under Linux/macOS/Windows at all.

See attached files for reproducing the bug.

Attachments (2)

rline.c (194 bytes ) - added by Cacodemon345 2 years ago.
Program file demostrating the behaviour
rline.txt (3 bytes ) - added by Cacodemon345 2 years ago.
Text file needed for reproduction

Download all attachments as: .zip

Change History (5)

by Cacodemon345, 2 years ago

Attachment: rline.c added

Program file demostrating the behaviour

by Cacodemon345, 2 years ago

Attachment: rline.txt added

Text file needed for reproduction

comment:1 by korli, 2 years ago

Component: - GeneralSystem/libroot.so
Priority: criticalnormal

comment:3 by korli, 2 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed

Should be fixed in hrev55930

Note: See TracTickets for help on using tickets.