kmodloader: fix invalid write during insmod, CodeQL warnings
Running 'insmod <module>' (without module options) tries to write an empty
option string (1 byte) to a mis-allocated zero-size memory block:
==381835== Command: ./insmod unix
==381835==
==381835== Invalid write of size 1
==381835== at 0x10A874: main_insmod (kmodloader.c:944)
==381835== by 0x10A874: main (kmodloader.c:1383)
==381835== Address 0x4ab6f60 is 0 bytes after a block of size 0 alloc'd
==381835== at 0x4848899: malloc (in vgpreload_memcheck-amd64-linux.so)
==381835== by 0x10A856: main_insmod (kmodloader.c:937)
==381835== by 0x10A856: main (kmodloader.c:1383)
Change main_insmod() to allocate at least 1 byte in this case for the
null-termination. Also rename local 'options' -> 'opts' to avoid confusion
with similar global, as suggested by CodeQL, and clarify pathname logic.
Fixes: c105f22064d6 ("kmodloader: eliminate some hardcoded buffer sizes")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>