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
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
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.
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…
D or C! That is why I will go with B
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.
You pointed out the error, but you still chose B?
C is the correct answer!
https://vulnerabilities.teammentor.net/article/8cdac89d-5f52-49fd-aea3-1d14d460a8c3
b
Correct answer is C
according to this link:
https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it
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
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.
my developer friend told me the answer is D
https://www.briefmenow.org/comptia/which-of-the-following-vulnerabilities-would-occur-if-t/
according to this link Correct answer is D. Missing null check
correct answer is D?
correct answer is D?