gaffe23 / linux-inject

Tool for injecting a shared object into a Linux process
Other
1.1k stars 246 forks source link

Calling checkloaded with wrong parameter? #9

Open CaledoniaProject opened 7 years ago

CaledoniaProject commented 7 years ago

If I load a library with relative path, e.g ./sample-library.so, the checkloaded function fails.

In the source code you're looking for the relative path,

if(checkloaded(target, libname))

Why not look for canonical path? The following code fixes the problem:

if(checkloaded(target, libPath))