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

yara doesn't compile if with-debug-verbose flag is enabled #1719

Closed
CatyGreen opened this issue May 31, 2022 · 3 comments
Closed

yara doesn't compile if with-debug-verbose flag is enabled #1719

CatyGreen opened this issue May 31, 2022 · 3 comments

Comments

@CatyGreen
Copy link

If I run make after ./configure --with-debug-verbose=2 I get the following error:

  CC       proc/linux.lo
In file included from proc/linux.c:42:proc/linux.c: 
In function 'yr_process_get_next_memory_block':
proc/linux.c:408:7: error: 'result' undeclared (first use in this function)
  408 |       result, 

To fix this, I had to add the following line
const uint8_t* result = NULL;
in the function yr_process_get_next_memory_block in libyara/proc/linux.c

Versions affected: yara 4.2.0 and yara 4.2.1

@wxsBSD
Copy link
Collaborator

wxsBSD commented May 31, 2022

This is odd because I've used that flag a number of times since it was introduced with no problems.

plusvic added a commit that referenced this issue Jun 1, 2022
@plusvic
Copy link
Member

plusvic commented Jun 1, 2022

Fixed in 6c5fd5e.

@plusvic plusvic closed this as completed Jun 1, 2022
@CatyGreen
Copy link
Author

I think that you should change the format too, now there is a warning:
proc/linux.c:407:7: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'YR_MEMORY_BLOCK'

plusvic added a commit that referenced this issue Jun 30, 2022
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

3 participants