unix,win: fix 'sprintf' is deprecated warning (#3813)
This commit is contained in:
parent
a7b16bfb33
commit
ec5130c3f9
@ -130,7 +130,7 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
tp += sprintf(tp, "%x", words[i]);
|
||||
tp += snprintf(tp, sizeof tmp - (tp - tmp), "%x", words[i]);
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user