Fixes for attacks from Eichlseder
Merge branch 'master' of https://github.com/catid/libcat