You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having troubles wrapping libyara using BridJ (0.7.0), for parameters passed back using callbacks I always get "Unaligned pointer access". I am on Mac OS X and the binding code was generated with JNAerator.
@OverRide
public int apply(int message, Pointer rulePtr, Pointer dataPtr) {
if (message != YaraLibrary.CALLBACK_MSG_RULE_MATCHING) {
return YaraLibrary.CALLBACK_CONTINUE;
}
Pointer<YR_RULE> rule = rulePtr.as(YR_RULE.class);
int g = rule.get().g_flags(); <-- Unaligned pointer access
And this is the YR_RULE definition:
@Library("yara")
public class YR_RULE extends StructObject {
static {
BridJ.register();
}
/** Global flags */ @field(0)
public int g_flags() {
return this.io.getIntField(this, 0);
}
Activity