Trevor Johnson wrote:
> for (j = TRUE; (!(j == EOF) && (j)); j = fscanf(setfile,
> "%[^:]:%3u:%3u:%1c\n", tmpstring, &left, &right, &recplay)) {
Be warned that this can't handle garbage input. The %[^:] has no bonds
checking making tmpstring to overflow on garbage input. Not a big deal
unless the program is SUID.
A more safe way is to limit the field with of the string variable.
char tmpstring[32];
...
.... fscanf(setfile,"%32[^:]:...
---
Henrik Nordstr�m
- How does one manage files with separators? nimennor
- Re: How does one manage files with separators? Trevor Johnson
- Re: How does one manage files with separators? Henrik Nordstrom
- Re: How does one manage files with separators? Glynn Clements
- Re: How does one manage files with separators? Henrik Nordstrom
- Re: How does one manage files with separators? Michael Ferrini
- RE: How does one manage files with separators? Mullen, Patrick
