Oops, sprintf -> snprintf

This commit is contained in:
Oliver Jowett 2016-01-21 20:22:18 +00:00
parent d9eec668cf
commit c4e162287d

View file

@ -881,7 +881,7 @@ static const char *jsonEscapeString(const char *str) {
static char *append_flags(char *p, char *end, int flags) static char *append_flags(char *p, char *end, int flags)
{ {
p += sprintf(p, end-p, "["); p += snprintf(p, end-p, "[");
if (flags & MODES_ACFLAGS_SQUAWK_VALID) if (flags & MODES_ACFLAGS_SQUAWK_VALID)
p += snprintf(p, end-p, "\"squawk\","); p += snprintf(p, end-p, "\"squawk\",");
if (flags & MODES_ACFLAGS_CALLSIGN_VALID) if (flags & MODES_ACFLAGS_CALLSIGN_VALID)