Which of the following vulnerabilities would occur if this is executed?

Refer to the following code:


Which of the following vulnerabilities would occur if this is executed?
A. Page exception
B. Pointer deference
C. Null Pointer Exception
D. Missing null check

How To Pass SY0-601 Exam?

CompTIA SY0-601 PDF dumps.

High quality SY0-601 pdf and software. VALID exam to help you pass.

comptia-exams

13 thoughts on “Which of the following vulnerabilities would occur if this is executed?

  1. Answer is C
    Pointer deference: A pointer stores the memory address of another value. When it retrieves the value, it is known as dereferencing the pointer

    null pointer exception is thrown when an application attempts to use an object reference that has the null value.

    https://www.oreilly.com/library/view/comptia-security-certification/9781789348019/27a58963-8296-45b0-ad17-94dd62832bdf.xhtml

    Not D since it didn’t ask what was wrong with the code, but what happens when it runs.

    Not A since this isn’t a web site.

  2. Where in the objectives for the exam is D mentioned? Or even better, what book that you have been using for the exam mention D? I have read GCGA, watch CBT nuggets, LinkedIn learning, and guess where I heard they mentioned that! NOWHERE…

  3. B – But only if the exam uses the word “DEREFERENCE’ not “DEFERENCE.” The question asks “Which of the following VULNERABILITIES would occur.” If an application is written to reference a portion of memory, but nothing is currently allocated to that area of memory, a NULL pointer DEREFERENCE will occur. This can cause the application to crash, display debug information, or create a denial of service (DoS). A definite vulnerability.

  4. Another weirdly worded question that makes me question if the writer of the question really knows what they are talking about. The question says “If this code is executed” which I think is key. If the code is executed, you will get a null pointer exception. If the developer had first checked for null, it would have prevented the exception. Since the developer is assigning the variable a null and then immediately using the variable, the code is obviously malicious and designed to cause a null pointer exception. My guess is C

  5. Answer is B I think but should be called “dereference”. Check 501 objectives. B-D are all very similar but “pointer dereference” is in 501 objectives.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.