X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=hivex%2Fhivexsh.c;fp=hivex%2Fhivexsh.c;h=6d83f0d2bd653d7146b7105f37301ad76dd6642a;hp=00f33ae8fc4e97ba183a32293182f9fb6d34b21a;hb=ba48a213aba137fd65df5c8407b6bd49f4476c24;hpb=495aa36aa67a2d626f1a855a0d01cfd5caa86a26 diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index 00f33ae..6d83f0d 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -58,6 +58,8 @@ #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; @@ -840,7 +842,7 @@ cmd_setval (char *nrvals_str) "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;