There is no way to be absolutely sure that there are no buffer overflow attacks. Although it would help to implement the client in a language that doesn’t have buffer overflows because it checks array indices (Python, Java, C#, …).
Re: Bitcoin and buffer overflow attacks
Figures: Wladimir van der Laan