This whitepaper goes into detail on how to bypass tolower() filters in buffer overflows. It uses a stack-based buffer overflow as an example but the technique can also be applied to heap overflows as well.
db7da31673402422788bf435e51bb26cce80674800f01ecfb89ff9f49608d751