Fix GDC's Linux sigscanning (#576)
The pointer returned by dlopen is not inside the loaded librarys memory region.
This commit is contained in:
parent
a0f060f000
commit
3fd7b29d64
@ -4,6 +4,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <link.h>
|
||||||
#include "gdc.h"
|
#include "gdc.h"
|
||||||
#include "GameConfigs.h"
|
#include "GameConfigs.h"
|
||||||
#include "MemoryUtils.h"
|
#include "MemoryUtils.h"
|
||||||
@ -619,7 +620,10 @@ int checkSigStringL(void *handle, const char* symbol)
|
|||||||
|
|
||||||
if (real_bytes >= 1)
|
if (real_bytes >= 1)
|
||||||
{
|
{
|
||||||
mu.FindPattern(handle, (char*)real_sig, real_bytes, matches, dummy);
|
// The pointer returned by dlopen is not inside the loaded librarys memory region.
|
||||||
|
struct link_map *dlmap = (struct link_map *)handle;
|
||||||
|
|
||||||
|
mu.FindPattern((void *)dlmap->l_addr, (char*)real_sig, real_bytes, matches, dummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user