Currently, SlimDetours treats invalid instructions as if their size is 1 byte: https://github.com/KNSoft/KNSoft.SlimDetours/blob/4cc236ae98ef10788da7a2b08aaf3bf660281bca/Source/SlimDetours/Disassembler.c#L1062-L1063 I think it'd be better for `SlimDetoursAttach` to return an error in this case.
Currently, SlimDetours treats invalid instructions as if their size is 1 byte:
KNSoft.SlimDetours/Source/SlimDetours/Disassembler.c
Lines 1062 to 1063 in 4cc236a
I think it'd be better for
SlimDetoursAttachto return an error in this case.