mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-18 09:53:17 +00:00
LOG: fix qb_vsnprintf_deserialize()
the strlcat was not call correctly, it needs the original string to find the end and return the correct length. Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
5a0bb8542b
commit
9d33e1f40d
@ -595,9 +595,7 @@ qb_vsnprintf_deserialize(char *string, size_t str_len, const char *buf)
|
||||
type_longlong = 0;
|
||||
p = strchrnul((const char *)format, '%');
|
||||
if (*p == '\0') {
|
||||
location = strlcat(&string[location], format, str_len) + 1;
|
||||
p += location;
|
||||
break;
|
||||
return strlcat(string, format, str_len) + 1;
|
||||
}
|
||||
/* copy from current to the next % */
|
||||
len = p - format;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user