File: 03_keyname-overflow

package info (click to toggle)
chntpw 0.99.6-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,024 kB
  • ctags: 483
  • sloc: ansic: 5,239; makefile: 92
file content (21 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/ntreg.c
+++ b/ntreg.c
@@ -2607,7 +2607,6 @@
     int count = 0;
     int countri = 0;
     int len, byte;
-    char keyname[128];
     char path[1024];
     char *value;
     struct nk_key *key;
@@ -2626,10 +2625,6 @@
 
     // get the key
     key = (struct nk_key *)(hdesc->buffer + nkofs);
-    strncpy(keyname, key->keyname, key->len_name);
-    keyname[key->len_name] = '\0';
-    printf("Exporting key '%s' with %d subkeys and %d values...\n",
-            keyname, key->no_subkeys, key->no_values);
 
     *path = 0;
     get_abs_path(hdesc, nkofs, path, 1024);