Mayhem crashes

Hi,

Those commits fix crashes reported by The Mayhem Team who run automated analysis of many Debian packages.

Cheers,
Balint