yara 1.4.4 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 1.5.0 /2011-04-18
2
+ * Version 1.5.0 supports yara 1.5 - it is not backward compatible
3
+
1
4
  == 1.4.3 / 2011-04-11
2
5
  * Support optional namespaces when calling compile_file or compile_string
3
6
  * Better yardoc tags
@@ -34,15 +34,19 @@ http://code.google.com/p/yara-project/
34
34
  end
35
35
 
36
36
  == Versioning
37
- The current version of libyara at the time of writing is 1.4.0. Bindings
37
+ The current version of libyara at the time of writing is 1.5.0. Bindings
38
38
  have been written against this API and may not work with earlier versions
39
39
  of the libyara library.
40
40
 
41
41
  The major and minor version numbers of the ruby library are intended
42
42
  to be in step with the C api version.
43
43
 
44
+ Note that yara-ruby began existence as of yara 1.4 so binding versions
45
+ go back this far. The yara 1.4 binding in ruby to use is the most recent
46
+ 1.4.X gem, and so on.
47
+
44
48
  == Requirements
45
- * libyara 1.4 must be installed - http://code.google.com/p/yara-project/
49
+ * libyara 1.5 must be installed - http://code.google.com/p/yara-project/
46
50
 
47
51
  == Installation
48
52
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.4
1
+ 1.5.0
@@ -95,7 +95,7 @@ MatchString_NEW(int offset, char *ident, char *buf, size_t buflen) {
95
95
  }
96
96
 
97
97
  int
98
- Match_NEW_from_rule(RULE *rule, unsigned char *buffer, VALUE *match) {
98
+ Match_NEW_from_rule(RULE *rule, VALUE *match) {
99
99
  match_info *mi;
100
100
  VALUE rb_mi = Qnil;
101
101
 
@@ -114,7 +114,7 @@ Match_NEW_from_rule(RULE *rule, unsigned char *buffer, VALUE *match) {
114
114
  rb_mi = Data_Wrap_Struct(class_Match, 0, free, mi);
115
115
 
116
116
  mi->rule = rb_iv_set(rb_mi, "@rule", rb_obj_freeze(rb_str_new2(rule->identifier)));
117
- mi->namespace = rb_iv_set(rb_mi, "@namespace", rb_obj_freeze(rb_str_new2(rule->namespace->name)));
117
+ mi->namespace = rb_iv_set(rb_mi, "@namespace", rb_obj_freeze(rb_str_new2(rule->ns->name)));
118
118
  mi->tags = rb_iv_set(rb_mi, "@tags", rb_ary_new());
119
119
  mi->strings = rb_iv_set(rb_mi, "@strings", rb_ary_new());
120
120
  mi->meta = rb_iv_set(rb_mi, "@meta", rb_hash_new());
@@ -130,12 +130,12 @@ Match_NEW_from_rule(RULE *rule, unsigned char *buffer, VALUE *match) {
130
130
  string = rule->string_list_head;
131
131
  while(string) {
132
132
  if (string->flags & STRING_FLAGS_FOUND) {
133
- m = string->matches;
133
+ m = string->matches_head;
134
134
  while (m) {
135
135
  rb_ary_push(mi->strings,
136
136
  MatchString_NEW(m->offset,
137
137
  string->identifier,
138
- buffer + m->offset,
138
+ m->data,
139
139
  m->length));
140
140
  m = m->next;
141
141
  }
@@ -25,7 +25,7 @@
25
25
  #include <yara.h>
26
26
 
27
27
  extern int
28
- Match_NEW_from_rule(RULE * rule, unsigned char * buffer, VALUE * match);
28
+ Match_NEW_from_rule(RULE * rule, VALUE * match);
29
29
 
30
30
  extern const char * SCAN_ERRORS[];
31
31
 
@@ -260,14 +260,14 @@ VALUE rules_set_namespace(VALUE self, VALUE rb_namespace) {
260
260
 
261
261
  /* an internal callback function used with scan_file and scan_string */
262
262
  static int
263
- scan_callback(RULE *rule, unsigned char *buffer, unsigned int buffer_size, void *data) {
263
+ scan_callback(RULE *rule, void *data) {
264
264
  int match_ret;
265
265
  VALUE match = Qnil;
266
266
  VALUE results = *((VALUE *) data);
267
267
 
268
268
  Check_Type(results, T_ARRAY);
269
269
 
270
- match_ret = Match_NEW_from_rule(rule, buffer, &match);
270
+ match_ret = Match_NEW_from_rule(rule, &match);
271
271
  if(match_ret == 0 && !NIL_P(match))
272
272
  rb_ary_push(results,match);
273
273
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 4
8
- - 4
9
- version: 1.4.4
7
+ - 5
8
+ - 0
9
+ version: 1.5.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Monti
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-11 00:00:00 -05:00
17
+ date: 2011-04-18 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- hash: -3417020004990498226
158
+ hash: -9224945978915744
159
159
  segments:
160
160
  - 0
161
161
  version: "0"