rcstorable 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/ext/rcstorable.c +4 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
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++;
|