| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | 100% (?) ANSI/ISO-complia |
SA> KK> buf = malloc(16384); SA> KK> file_size += (block_read = fread(buf, 16384, 1, fp)); SA> Erm, where space for terminating null? SA> You're reading in 16384 bytes into a space of 16384, and SA> the terminator's going to overrun, surely? fread() isn't a text input. fread() is a binary input. It will read exactly how many bytes it is told to read. fgets() is a variable length text input, and will automatically adjust for the null terminator when given the length of the string space reserved as the size argument. > ]* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750) SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810 SEEN-BY: 639/252 670/213 218 @PATH: 154/750 222 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.