mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
Fix string buffer overflow
This commit is contained in:
parent
8a3ee79797
commit
36bc5ff390
@ -1988,7 +1988,7 @@ static int is_interesting(const char *id_hex, int64_t version)
|
||||
int rhizome_is_bar_interesting(unsigned char *bar)
|
||||
{
|
||||
int64_t version = rhizome_bar_version(bar);
|
||||
char id_hex[RHIZOME_BAR_PREFIX_BYTES + 2];
|
||||
char id_hex[RHIZOME_BAR_PREFIX_BYTES *2 + 2];
|
||||
tohex(id_hex, RHIZOME_BAR_PREFIX_BYTES * 2, &bar[RHIZOME_BAR_PREFIX_OFFSET]);
|
||||
strcat(id_hex, "%");
|
||||
return is_interesting(id_hex, version);
|
||||
|
Loading…
Reference in New Issue
Block a user