Debian Codegraph @

debian/patches/03_keyname-overflow

raw
1 --- a/ntreg.c
2 +++ b/ntreg.c
3 @@ -2607,7 +2607,6 @@
4 int count = 0;
5 int countri = 0;
6 int len, byte;
7 - char keyname[128];
8 char path[1024];
9 char *value;
10 struct nk_key *key;
11 @@ -2626,10 +2625,6 @@
12
13 // get the key
14 key = (struct nk_key *)(hdesc->buffer + nkofs);
15 - strncpy(keyname, key->keyname, key->len_name);
16 - keyname[key->len_name] = '\0';
17 - printf("Exporting key '%s' with %d subkeys and %d values...\n",
18 - keyname, key->no_subkeys, key->no_values);
19
20 *path = 0;
21 get_abs_path(hdesc, nkofs, path, 1024);