nerdexam
EC-Council

EC0-350 · Question #332

A developer for a company is tasked with creating a program that will allow customers to update their billing and shipping information. The billing address field used is limited to 50 characters…

The correct answer is D. if (billingAddress <= 50) {update field} else exit. See the full explanation below for the reasoning.

Question

A developer for a company is tasked with creating a program that will allow customers to update their billing and shipping information. The billing address field used is limited to 50 characters. What pseudo code would the developer use to avoid a buffer overflow attack on the billing address field?

Options

  • Aif (billingAddress = 50) {update field} else exit
  • Bif (billingAddress != 50) {update field} else exit
  • Cif (billingAddress >= 50) {update field} else exit
  • Dif (billingAddress <= 50) {update field} else exit

How the community answered

(56 responses)
  • A
    7% (4)
  • B
    4% (2)
  • C
    18% (10)
  • D
    71% (40)

Community Discussion

No community discussion yet for this question.

Full EC0-350 Practice