GAQM CPEH-001 Exam - Topic 4 Question 114 Discussion
Buffer X in an Accounting application module for Brownies Inc. can contain 200 characters. The programmer makes an assumption that 200 characters are more than enough. Because there were no proper boundary checks being conducted, Bob decided to insert 400 characters into the 200-character buffer. (Overflows the buffer). Below is the code snippet:How can you protect/fix the problem of your application as shown above?
A) Because the counter starts with 0, we would stop when the counter is less than 200 and D) Add a separate statement to signify that if we have written 200 characters to the buffer, the stack should stop because it cannot hold any more data
B) Because the counter starts with 0, we would stop when the counter is more than 200
C) Add a separate statement to signify that if we have written less than 200 characters to the buffer, the stack should stop because it cannot hold any more data
Lavonne
7 months agoKarol
7 months agoQueen
7 months agoTroy
7 months agoMaile
8 months agoAnabel
8 months agoMarylyn
8 months agoNarcisa
8 months agoNakisha
9 months agoCorazon
9 months agoAmie
9 months agoMitsue
9 months agoLili
9 months agoGail
11 months agoEnola
11 months agoBette
11 months agoRochell
11 months agoThurman
11 months agoRasheeda
10 months agoGail
11 months agoLouis
11 months agoJeff
10 months agoBobbye
10 months agoMartina
11 months agoEttie
1 year agoKerry
11 months agoHorace
11 months agoOna
11 months ago