Sophie

Sophie

distrib > Mageia > 8 > aarch64 > by-pkgid > 77ea68a930337ddaa524a84012be201c > files > 5

chntpw-1.0-5.mga8.src.rpm

Diagnose a missing hive file name with -e.
--- a/reged.c
+++ b/reged.c
@@ -167,6 +167,11 @@
 
   if (edit) {  /* Call editor. Rest of arguments are considered hives to load */
     hivename = argv[optind+no_hives];
+    if (!hivename) {
+      fprintf(stderr,"with -e you must specify at least one hive file name\n");
+      usage();
+      exit(1);
+    }
     do {
       if (!(hive[no_hives] = openHive(hivename,
 				      HMODE_RW|mode))) {