do buffer overflow happens with global variables
buffer overflow
Collapse
This topic is closed.
X
X
-
raashid bhattTags: None -
Nick Keighley
Re: buffer overflow
On 19 Aug, 14:53, raashid bhatt <raashidbh...@g mail.comwrote:
I think you're going to have to expand your question.do buffer overflow happens with global variables
Do you mean
1. can overflow occur with global variables?
2. can buffer overflow *only* happen with GVs?
3. do BOs *always* happen with GVs?
int ga [10];
int gi = 11;
int main (void)
{
int a;
int i = 12;
gi = 11;
ga[gi] = 0; /* 1 */
ga[i] = 0 /* 1 */
a[gi] = 0; /* 2 */
a[i] = 0; /* 2 */
i = 0;
gi = 1;
a[i] = 0; /* 3 */
ga[gi] = 0; /* 3 */
return 0;
}
now, why did you ask the question? What answer did you expect?
--
Nick Keighley
-
santosh
Re: buffer overflow
raashid bhatt wrote:
Yes, they can.do buffer overflow happens with global variables
Comment
-
Daniel Molina Wegener
Re: buffer overflow
On Aug 19, 9:53 am, raashid bhatt <raashidbh...@g mail.comwrote:Global, local, static, and any variable...do buffer overflow happens with global variables
If you understand what a buffer overflow means, it
can occur on any non insufficient allocated memory
block or wrong handled memory block size, such as
integer overflows...
Regards,
DMW
Comment
-
Richard W
Comment