如果一个指针变量的值为NULL,解引用这个指针时,会导致程序崩溃(Segmentation fault)。 二、空指针解引用有什么危害? 指针操作不当会产生动态内存错误,比如内存泄漏(MemoryLeakage)、内存的重复释放、空指针解引用(NullPointer Dereference)。 其中空指针引用故障,也叫空指针解引用是一类普遍存在的内存故障,是程序设计语言...
“空指標解引用”在CWE中編號為CWE-476: NULL Pointer Dereference 來自“ ITPUB部落格 ” ,連結:http://blog.itpub.net/70000012/viewspace-2786563/,如需轉載,請註明出處,否則將追究法律責任。
NULL pointer dereference erros are common in C/C++ languages. Pointer is a programming language data type that references a location in memory. Once the value of the location is obtained by the pointer, this pointer is considered dereferenced. The NULL pointer dereference weakness occurs where appl...
NULL Pointer Dereference Weakness ID: 476 (Weakness Base) Status: Draft Description Description Summary A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. Time of Introduction Implementation ...