nerdexam
EC-Council

312-92 · Question #96

What type of problem or error will result from the following statement? void f2b(void arg, size_t len) { char buffer[100]; long val = ...; long ptr = ...; extern void (f)(); memcpy(buff, arg, len)…

The correct answer is A. Pointer subterfuge. See the full explanation below for the reasoning.

Question

What type of problem or error will result from the following statement? void f2b(void * arg, size_t len) { char buffer[100]; long val = ...; long *ptr = ...; extern void (*f)(); memcpy(buff, arg, len); *ptr = val; f(); return; }

Options

  • APointer subterfuge
  • BHeap smashing
  • CVirtual pointer smashing
  • DSign error

How the community answered

(13 responses)
  • A
    85% (11)
  • B
    8% (1)
  • D
    8% (1)

Community Discussion

No community discussion yet for this question.

Full 312-92 Practice