This thesis deals with the memory safety issue in life-critical medical devices. Over the last few years, several vulnerabilities such as memory exploits have been identified in various Internet of Medical Things (IoMT) devices. In the worst case, such vulnerabilities allow an attacker to remotely force an application to execute malicious actions. While many countermeasures against software exploits have beenproposed so far, only a few of them seem to be suitable for medical devices. Indeed,these devices are constrained by their size, real-time performances, and safety requirements making the integration of security challenging. To address this issue,the thesis proposes two approaches. Both address the memory safety issue fromthe software d...