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:
Angus Salkeld 2012-09-05 18:35:19 +10:00
parent 5a0bb8542b
commit 9d33e1f40d

View File

@ -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;