git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Distribute hivexsh.1.html HTML file.
[libguestfs.git]
/
hivex
/
hivexsh.c
diff --git
a/hivex/hivexsh.c
b/hivex/hivexsh.c
index
00f33ae
..
51d8cfb
100644
(file)
--- a/
hivex/hivexsh.c
+++ b/
hivex/hivexsh.c
@@
-58,6
+58,8
@@
#include "hivex.h"
#include "byte_conversions.h"
#include "hivex.h"
#include "byte_conversions.h"
+#define HIVEX_MAX_VALUES 1000
+
static int quit = 0;
static int is_tty;
static hive_h *h = NULL;
static int quit = 0;
static int is_tty;
static hive_h *h = NULL;
@@
-840,7
+842,7
@@
cmd_setval (char *nrvals_str)
"setval", "nrvals", "xstrtol", xerr);
return -1;
}
"setval", "nrvals", "xstrtol", xerr);
return -1;
}
- if (nrvals < 0 || nrvals >
1000
) {
+ if (nrvals < 0 || nrvals >
HIVEX_MAX_VALUES
) {
fprintf (stderr, _("%s: %s: integer out of range\n"),
"setval", "nrvals");
return -1;
fprintf (stderr, _("%s: %s: integer out of range\n"),
"setval", "nrvals");
return -1;
@@
-911,7
+913,7
@@
cmd_setval (char *nrvals_str)
}
else if (STRPREFIX (buf, "expandstring:")) {
buf += 13;
}
else if (STRPREFIX (buf, "expandstring:")) {
buf += 13;
- values[i].t = hive_t_string;
+ values[i].t = hive_t_
expand_
string;
int nr_chars = strlen (buf);
values[i].len = 2 * (nr_chars + 1);
values[i].value = malloc (values[i].len);
int nr_chars = strlen (buf);
values[i].len = 2 * (nr_chars + 1);
values[i].value = malloc (values[i].len);