mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
avoid buffer strncpy-induced buffer overrun
* dirmngr/crlcache.c (open_dir): Ensure that both this_update and next_update member strings are NUL-terminated.
This commit is contained in:
parent
6e3882785a
commit
20c9ac4df3
@ -587,8 +587,14 @@ open_dir (crl_cache_t *r_cache)
|
||||
case 2: entry->issuer_hash = p; break;
|
||||
case 3: entry->issuer = unpercent_string (p); break;
|
||||
case 4: entry->url = unpercent_string (p); break;
|
||||
case 5: strncpy (entry->this_update, p, 15); break;
|
||||
case 6: strncpy (entry->next_update, p, 15); break;
|
||||
case 5:
|
||||
strncpy (entry->this_update, p, 15);
|
||||
entry->this_update[15] = 0;
|
||||
break;
|
||||
case 6:
|
||||
strncpy (entry->next_update, p, 15);
|
||||
entry->next_update[15] = 0;
|
||||
break;
|
||||
case 7: entry->dbfile_hash = p; break;
|
||||
case 8: if (*p) entry->crl_number = p; break;
|
||||
case 9:
|
||||
|
Loading…
x
Reference in New Issue
Block a user