function fake_modname is prepared to read a full path to a file and retrieve its name, without and extension (".").
As example, in a path like "boot/kernel.elfv2", the substring "kernel" is extracted.
However, in paths like "boot/test.elfv2/kernel", the dot (".") is being misidentified, causes incorrect string length being calculated. It should look for a "dot" only in the last part of the file name, after the last slash character.
Note: the kernel used in this test doesn't contain any valid module, so it falls in " if (modcnt == 0)" in "__elfN(parse_modmetadata)" functions, causing fake_modname being called.