Re: memcmp() checker: memory access errors
- From: Kohn Emil Dan <emild@xxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Dec 2006 00:26:12 +0200
On Mon, 18 Dec 2006, kolmogolov@xxxxxxxxx wrote:
<snipped>
BTW. I do ungetc() all 256 bytes in data[] back to the stream
for decoupling the probe_img() from all the other functions
for parsing the details of the headers. I thought tha it were s
a proper size for probing many kinds of my image files.
Be careful, because ungetc() can fail to push back the bytes to the input stream. The standard guarantees that only one push back can succeed without an intervening read or file positioning function (in which case your pushed back characters will be be discarded).
Emil
.
- Follow-Ups:
- Re: memcmp() checker: memory access errors
- From: kolmogolov@xxxxxxxxx
- Re: memcmp() checker: memory access errors
- References:
- memcmp() checker: memory access errors
- From: kolmogolov@xxxxxxxxx
- Re: memcmp() checker: memory access errors
- From: malc
- Re: memcmp() checker: memory access errors
- From: Richard Bos
- Re: memcmp() checker: memory access errors
- From: kolmogolov@xxxxxxxxx
- memcmp() checker: memory access errors
- Prev by Date: Re: <OT> Re: I have a doubt
- Next by Date: Re: <OT> Re: I have a doubt
- Previous by thread: Re: memcmp() checker: memory access errors
- Next by thread: Re: memcmp() checker: memory access errors
- Index(es):
Relevant Pages
|