Secure Coding Guidelines

    1. Use only the amount of memory asked using malloc. Make sure not to cross either boundary.
    2. Free only the memory that was dynamically allocated exactly once.
    3. Always check the return value of malloc for .
    1. After every free, re-assign each pointer pointing to the recently freed memory to .
    2. Zero out sensitive data before freeing it using or a similar method that cannot be optimised out by the compiler.
    3. Do not make any assumption regarding the positioning of the returned addresses from malloc.