git://wimlib.net
/
wimlib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92dd1b3
)
registry: define MAX_VALUE_SIZE with other limits
author
Eric Biggers
<ebiggers3@gmail.com>
Fri, 22 Jan 2016 02:01:54 +0000
(20:01 -0600)
committer
Eric Biggers
<ebiggers3@gmail.com>
Fri, 22 Jan 2016 02:45:33 +0000
(20:45 -0600)
src/registry.c
patch
|
blob
|
history
diff --git
a/src/registry.c
b/src/registry.c
index 6b7f9815bce7a97b7385741934d83a3176e400a7..36ecdd39e231e3f7fe5fd24e4418853cbbce4245 100644
(file)
--- a/
src/registry.c
+++ b/
src/registry.c
@@
-143,6
+143,7
@@
struct data_cell {
/* Arbitrary limits for safety */
#define MAX_VALUES 65536
+#define MAX_VALUE_SIZE 1048576
#define MAX_SUBKEYS 65536
#define MAX_SUBKEY_LIST_LEVELS 5
#define MAX_SUBKEY_LISTS 4096
@@
-532,7
+533,7
@@
retrieve_value(const struct regf *regf, const tchar *key_name,
is_inline = (data_size & 0x80000000);
data_size &= 0x7FFFFFFF;
- if (data_size >
1048576) /* Arbitrary limit */
+ if (data_size >
MAX_VALUE_SIZE)
return HIVE_CORRUPT;
if (is_inline) {