Fix: bug in gadget search comparison for null characters

Gadgets containing a null character were not compared properly. strncmp ignored everything after the first null character and invalid gadgets were found.