Browse Source

http: avoid using sprintf

Use snprintf to avoid a deprecation warning about sprintf on Darwin platforms.

(cherry picked from commit b93f201c75)
3.0.x
Marvin Scholz 3 years ago
committed by Steve Lhomme
parent
commit
db607fb089
  1. 2
      modules/access/http/message.c

2
modules/access/http/message.c

@ -409,7 +409,7 @@ struct vlc_h2_frame *vlc_http_msg_h2_frame(const struct vlc_http_msg *m,
if (m->status >= 0)
{
assert(m->status < 1000);
sprintf(status, "%hd", m->status);
snprintf(status, ARRAY_SIZE(status), "%hd", m->status);
headers[i][0] = ":status";
headers[i][1] = status;
i++;

Loading…
Cancel
Save