C: What is a/example of a buffer underflow? -


I know what an buffer overflow is what I do not know what Buffer Underflow .

I'm guessing that when the overflow of a specific buffer bytes is obtained, instead of an underflow of bytes.

  four buffers [8]; Fgets (buffer, size (buffer), staden);   

The above will not make any errors.

  Four buffer_overflow [8]; Fast (buffer-overflow, 16, studin);   

The above result was buffer overflow if the user was in the input, for example "deutschland"

Could I get an example in the code, what is the buffer underflow ?

There is no buffer underflow directly related to a buffer overflow though, buffer underflow, with one example The problem may be ring buffers.

For example, consider audio playback: Your audio buffer possibly has a ring buffer somewhere in the kernel memory. If you write data slowly with the buffer audio driver / hardware than the buffer, then the buffer is empty ( "Underflow"), which causes the stutoring audio to play. Other types of real-time data processing and media playback are also present.

Thus buffer underflow is often not a mistake situation (unlike buffer overflow, which usually causes the program to undefine, such as unwanted behaviors such as termination, execution of some unwanted codes, and so on Kind).

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -