Skip to content

Commit

Permalink
Add new error code constant; change required YARA version to 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hillu committed Mar 27, 2023
1 parent c137d3e commit 0769da3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ the `yara-python` implementation.

## Build/Installation

On Unix-like systems, _libyara_ version 4.2, corresponding header files,
On Unix-like systems, _libyara_ version 4.3, corresponding header files,
and _pkg-config_ must be installed. Adding _go-yara_ v4 to a project
with Go Modules enabled, simply add the proper dependency…

Expand Down Expand Up @@ -64,7 +64,10 @@ libraries also need to be added to `CGO_LDFLAGS`.

## YARA 4.1.x vs. earlier versions

This version of _go-yara_ can only be used with YARA 4.2 or later.
This version of _go-yara_ can only be used with YARA 4.3 or later.

Version of _go-yara_ compatible with YARA 4.1.x are available via the
`v4.2.x` branch or tagged `v4.2.*` releases.

Version of _go-yara_ compatible with YARA 4.1.x are available via the
`v4.1.x` branch or tagged `v4.1.*` releases.
Expand Down
4 changes: 2 additions & 2 deletions cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ package yara
// #cgo yara_no_pkg_config LDFLAGS: -lyara -lm
/*
#include <yara.h>
#if YR_VERSION_HEX < 0x040200
#error YARA version 4.2 required
#if YR_VERSION_HEX < 0x040300
#error YARA version 4.3 required
#endif
*/
import "C"
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ var errorStrings = map[int]string{
C.ERROR_BLOCK_NOT_READY: "block not ready",
C.ERROR_INVALID_PERCENTAGE: "invalid percentage",
C.ERROR_IDENTIFIER_MATCHES_WILDCARD: "identifier matches wildcard",
C.ERROR_ERROR_INVALID_VALUE: "invalid value",
}

0 comments on commit 0769da3

Please sign in to comment.