rcstorable 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/ext/rcstorable.c +4 -2
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.2.0
data/ext/rcstorable.c CHANGED
@@ -66,6 +66,8 @@ check_pointer(unsigned char *ptr)
66
66
  static void
67
67
  read_magic_numbers()
68
68
  {
69
+ extern unsigned char *serialized;
70
+ check_pointer(serialized+1);
69
71
  serialized++;
70
72
  serialized++;
71
73
  }
@@ -196,8 +198,8 @@ read_string(bool extended_size)
196
198
  char *np = malloc(size * sizeof(char) + 1);
197
199
  char *cnp = np;
198
200
 
201
+ check_pointer(serialized+rem-1);
199
202
  while (rem > 0) {
200
- check_pointer(serialized);
201
203
  rem--;
202
204
  *cnp++ = *serialized++;
203
205
  }
@@ -216,7 +218,7 @@ read_extended_size()
216
218
  {
217
219
  extern unsigned char *serialized;
218
220
  int size = 0;
219
- check_pointer(serialized);
221
+ check_pointer(serialized+3);
220
222
 
221
223
  serialized++;
222
224
  serialized++;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcstorable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey