From: Richard Jones Date: Fri, 19 Feb 2010 13:51:07 +0000 (+0000) Subject: hivexsh: Print hex bytes >= 0x80 correctly. X-Git-Tag: 1.0.85~13 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=219b80cc6c9c1410c39a6e540214727e3e3cf022;p=libguestfs.git hivexsh: Print hex bytes >= 0x80 correctly. These were being interpreted as signed chars, and thus printed as "ffffff80" etc. --- diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index a8ac0e1..332b773 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -800,7 +800,8 @@ cmd_lsval (char *key) case hive_t_full_resource_description: case hive_t_resource_requirements_list: default: { - char *data = hivex_value_value (h, values[i], &t, &len); + unsigned char *data = + (unsigned char *) hivex_value_value (h, values[i], &t, &len); if (!data) goto error;