11.01.2015 Views

PDF Presentation - Uplinq

PDF Presentation - Uplinq

PDF Presentation - Uplinq

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Apply Brew MP Best Practices to Avoid Memory<br />

Corruptions<br />

• The performance of a ‘crashed’ system is ZERO<br />

• Release all BMP API’s through IQI_RELEASEIF().IQI_RELEASEIF<br />

– Ensures only memory of a non-null null API pointer is released<br />

– After the release the pointer will be set to NULL<br />

• All the FREE() should be replaced with FREEIF()<br />

– FREEIF() will ensure that only memory of a non-null null pointer is freed<br />

– After the free, the pointer will be set to NULL<br />

• Only use the version of the helper functions that accept “size” as one its<br />

parameters for boundary checking. This includes functions like strncpy,<br />

snprintf, etc… This will avoid any possible buffer-overrun.<br />

37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!