So free cannot modify ptr to anything else
This description really does not apply for userspace applications
Assigning to it will never overwrite program code or OS code, because that memory will not be writable for normal userland applications, so program will just crash the moment that is attempted
Ohh this clarification was necessary as it wrongly scared me how dangerous dangling pointers can be
dangling pointers are definitely dangerous
Обсуждают сегодня