- To check stack smashing (buffer overflow) - To check if the buffer without enough length gets appropriate values filled - To check if the format has expected length