Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with Process injection native and native-map_view_section.cpp #41

Closed
bestrocker221 opened this issue Jun 13, 2022 · 1 comment

Comments

@bestrocker221
Copy link

Describe the bug
Compilation error when using native-map_view_section.cpp with native executable

The error is the following:
[-] Error: C:\PATH\inceptor\temp\tmpp_gn47jr.cpp(128,32): error: non-constant-expression cannot be narrowed from type 'SIZE_T' (aka 'unsigned long long') to 'DWORD' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]

To Reproduce
python3.exe .\inceptor.py native -P -P0 process

Tried to add the -Wnoc++11-narrowing option but still no luck.

Thanks in advance

@klezVirus
Copy link
Owner

klezVirus commented Jun 13, 2022

Hi @bestrocker221, based on the error I guesses this was for Clang/LLVM.

Fixed with last commit at main branch 89cdee799e94f4dc8b8244a61fa47f6fff4206f5.

Unfortunately, unlike GCC, MS compilers are quite strict with types etc. Luckily, in this case, the issue is easily solved with an explicit cast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants