pass the complete buffer size to snprintf

There is no reason to pass size-1, snprintf will always put a \0
at the end.
This commit is contained in:
Wim Taymans 2021-02-02 12:09:29 +01:00
parent 41063578a5
commit 2b44f42845
13 changed files with 27 additions and 27 deletions

View file

@ -691,7 +691,7 @@ int pw_manager_set_metadata(struct pw_manager *manager,
if (type != NULL) {
va_start(args, format);
vsnprintf(buf, sizeof(buf)-1, format, args);
vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
value = buf;
} else {