Skip to content

Commit

Permalink
Fix LIEF::ELF::Binary::has_nx
Browse files Browse the repository at this point in the history
The result boolean expression has been inverted in a previous commit
  • Loading branch information
ergrelet committed Dec 7, 2023
1 parent fac0e78 commit 0c7c79b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ELF/Binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ bool Binary::is_pie() const {

bool Binary::has_nx() const {
if (const Segment* gnu_stack = get(SEGMENT_TYPES::PT_GNU_STACK)) {
return gnu_stack->has(ELF_SEGMENT_FLAGS::PF_X);
return !gnu_stack->has(ELF_SEGMENT_FLAGS::PF_X);
}

if (header().machine_type() == ARCH::EM_PPC64) {
Expand Down

0 comments on commit 0c7c79b

Please sign in to comment.