durable_rules 2.0.25 → 2.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/rules/rules.h +2 -0
- data/src/rules/state.c +11 -2
- data/src/rules/state.h +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66daf9319c034fbbd3d388eba124e64e12103fcb
|
4
|
+
data.tar.gz: 055312b7e94017d4e5e124e9f27c2fff97c9fc68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9df45551b2eaa89231fae586189169c282f5baf592b45e579503d58fb6d71ea1ef5ffc9f02027ff333062310942d741b2d4c57f982c540fd5a8b8e1ed2a666f3
|
7
|
+
data.tar.gz: d82b76e77d9debc73d3fde16793d70456e039bbf59c417a3471cf30869e1278f18065415e0ec5505f3d09c6c55ed66b5343546f45577c764936f63ae1b24a225
|
data/src/rules/rules.h
CHANGED
@@ -33,6 +33,8 @@
|
|
33
33
|
#define ERR_NO_ACTION_AVAILABLE 310
|
34
34
|
#define ERR_PROPERTY_NOT_FOUND 311
|
35
35
|
#define ERR_OPERATION_NOT_SUPPORTED 312
|
36
|
+
#define ERR_EVENT_MAX_OBJECT_SIZE 313
|
37
|
+
#define ERR_EVENT_MAX_OBJECT_PROPERTY_SIZE 314
|
36
38
|
#define ERR_PARSE_REGEX 501
|
37
39
|
#define ERR_REGEX_MAX_TRANSITIONS 502
|
38
40
|
#define ERR_REGEX_MAX_STATES 503
|
data/src/rules/state.c
CHANGED
@@ -1378,8 +1378,17 @@ unsigned int getObjectProperty(jsonObject *jo,
|
|
1378
1378
|
unsigned int setObjectProperty(jsonObject *jo,
|
1379
1379
|
unsigned int hash,
|
1380
1380
|
unsigned char type,
|
1381
|
-
unsigned
|
1382
|
-
unsigned
|
1381
|
+
unsigned int valueOffset,
|
1382
|
+
unsigned int valueLength) {
|
1383
|
+
|
1384
|
+
if (valueLength >= MAX_OBJECT_PROPERTY_SIZE) {
|
1385
|
+
return ERR_EVENT_MAX_OBJECT_PROPERTY_SIZE;
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
if (valueOffset >= (MAX_OBJECT_SIZE - MAX_OBJECT_PROPERTY_SIZE)) {
|
1389
|
+
return ERR_EVENT_MAX_OBJECT_SIZE;
|
1390
|
+
}
|
1391
|
+
|
1383
1392
|
jsonProperty *property = &jo->properties[jo->propertiesLength];
|
1384
1393
|
++jo->propertiesLength;
|
1385
1394
|
if (jo->propertiesLength == MAX_OBJECT_PROPERTIES) {
|
data/src/rules/state.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
#include <time.h>
|
2
|
+
#include <time.h>
|
3
3
|
|
4
4
|
#define HASH_ID 926444256
|
5
5
|
#define HASH_SID 3593476751
|
@@ -18,6 +18,8 @@
|
|
18
18
|
|
19
19
|
#define UNDEFINED_HASH_OFFSET 0
|
20
20
|
#define MAX_OBJECT_PROPERTIES 255
|
21
|
+
#define MAX_OBJECT_SIZE 4294967296
|
22
|
+
#define MAX_OBJECT_PROPERTY_SIZE 16777216
|
21
23
|
#define MAX_MESSAGE_FRAMES 16
|
22
24
|
#define MAX_MESSAGE_INDEX_LENGTH 512
|
23
25
|
#define MAX_LEFT_FRAME_INDEX_LENGTH 512
|
@@ -64,8 +66,8 @@ typedef struct pool {
|
|
64
66
|
typedef struct jsonProperty {
|
65
67
|
unsigned int hash;
|
66
68
|
unsigned char type;
|
67
|
-
unsigned
|
68
|
-
unsigned
|
69
|
+
unsigned int valueOffset;
|
70
|
+
unsigned int valueLength;
|
69
71
|
union {
|
70
72
|
long long i;
|
71
73
|
double d;
|
@@ -193,8 +195,8 @@ unsigned int getObjectProperty(jsonObject *jo,
|
|
193
195
|
unsigned int setObjectProperty(jsonObject *jo,
|
194
196
|
unsigned int hash,
|
195
197
|
unsigned char type,
|
196
|
-
unsigned
|
197
|
-
unsigned
|
198
|
+
unsigned int valueOffset,
|
199
|
+
unsigned int valueLength);
|
198
200
|
|
199
201
|
unsigned int constructObject(char *root,
|
200
202
|
char *parentName,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: durable_rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesus Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|