hivexsh: Print hex bytes >= 0x80 correctly.
authorRichard Jones <rjones@redhat.com>
Fri, 19 Feb 2010 13:51:07 +0000 (13:51 +0000)
committerRichard Jones <rjones@redhat.com>
Fri, 19 Feb 2010 15:02:14 +0000 (15:02 +0000)
These were being interpreted as signed chars, and thus printed
as "ffffff80" etc.

hivex/hivexsh.c

index a8ac0e1..332b773 100644 (file)
@@ -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;