answersLogoWhite

0

A buffer overflow occurs when a program tries to store some amount of data in a location which cannot contain that amount of data. For example, trying to store an array of 10 integers in an array with room for 5 integers will cause a buffer overflow.

Buffer overflows are common in C/C++, specifically in the strcpy function. This function copies the data from one string (char array) into another. It is often abused by clever hackers to either crash a program or to inject their own instructions onto the execution stack.

The "extra" data copied over from the larger array doesn't magically disappear. The "overflow" refers to that data overwriting data on the stack. While this will often just crash the program (or computer), those clever hackers mentioned above may happen to know enough about the program structure to be able to insert their own low-level computer instructions to execute arbitrary code on the machine.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

What do you mean by buffer in micro processor?

A buffer is merely a temporary storage used in conjunction with computation.


Why gets function gives a warning every time you compile a c program?

It is unsafe. In order to use gets() safely, you need to know how many characters you will be reading to ensure your character buffer is large enough: char buffer[10]; while (gets (buffer) != 0) { ...process buffer... } The above code has undefined behaviour when the number of characters read is 10 or more (you need one character for the null-terminator). This is because the character buffer, str, decays to a pointer (referencing &str[0]) and the function, gets(), cannot determine the number of characters in a buffer by its pointer alone. The gets() function was dropped from the C standard in 2011, however some implementations still include it. To avoid the warning, use the fgets() function instead. This allows you to specify the length of your buffer and (when used correctly) prevents buffer overflow. char buffer[10]; while (fgets (buffer, 10, stdin) != 0) { ...process buffer... }


What is overflow and underflow in queue?

In C Programming arrays are given a size, which is the number of elements in the array. Space is allocated for an array in memory. The is the only memory that the array is supposed to use. C is a programming language that has very little restrictions regarding what it will allow you to do. If you try to write to a memory location that is not supposed to be written over, C will let you, however sometimes the operating system will prevent this. When an array writes past where it is supposed to this is called array overflow. For example. If is an array is designed to hold 50 integers and the program adds 51 integers then the extra integer is written at the end of the array and had to be written in memory not designated for the array.


What does it mean when the condensation overflow tube for your house air conditioner is leaking through your ceiling?

The overflow tube is clogged is my first guess, unless someone or something has cracked the drain tube with activity in the area.


Does a bar sink have a overflow drain?

Most of the one's I have run across do not have an overflow. Mainly used for disposal, dumping out drinks, etc, not for washing so overflow not really an issue. Also, most are stainless which do not lend themselves to an overflow drain.

Related Questions

What is the Morris finger worm?

Buffer overflow errors


Does the AMD FX-55 CPU have NX buffer overflow protection?

Yes.


Which of the following can be used for protection against buffer overflow attacks?

Input validation


What is the meaning of stack-based buffer overflow?

A buffer overflow occurs when you put more stuff into it than it can hold. For a stack, it means you put or pushed onto the stack more information than the size of the stack.If I have a stack that can hold 10 entries, then putting 11 in the stack will overflow it.


What can trigger a buffer overflow?

A buffer overflow occurs when a program attempts to write data to a buffer, but exceeds the boundaries of the buffer, similar to Java's "Array Out of Bounds Exception." This could happen with poorly written code that fails to check for the end of the buffer, or it could be exploited maliciously. One exploitative example would be a stack buffer overflow, in which data is copied to a local variable on the stack. But if the data is larger than the local variable can contain, the extra data will "spill over" onto nearby memory. This would allow one to overwrite data that was not intended to be altered.


what type of attack that can be avoided by using proper input validation rules?

buffer overflow


How do you avoid data buffer overflow in transport layer?

There is a special bit signaling if the buffer is full. If the buffer is full the bit signals "BUSY" as result transmission stops until the bit changes to "READY" and transmission resumes.


What do you mean by voltage buffer?

A voltage buffer is a circuit that will buffer a source from an output.


List the security attack that can not be prevent by encryption?

Buffer Overflow, Brute Force, Denial-of-Service, Exploitation, Trojans, and Phishing are a few.


Is there a network security book that does not have buffer overflow in it's index?

Not if it is a good book; that should be a covered topic in any discussion of security.


Which two Latin words mean overflow?

There are a number of (single) words available, inrigo as in to overflow or irrigate, abundo as in to be abundant and overflow, superfundo as in to flood or overflow, restagno as in to be swamped or overflow, exundo as in to flow out or overflow, adfluentia as in to overflow with abundance


What does this mean an overflow of good converts to bad?

An overflow of good converts to bad