summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-06-09 17:01:02 -0300
committerJames Almer <jamrial@gmail.com>2021-11-25 12:06:15 -0300
commitb46817d9c3fe620ba02f2b3144444c431c6ba552 (patch)
treedf88c35241e67a55c71c62920374783c5686e4cb /libavformat/http.c
parent522f577d7eca66c65aece841610cb008a10c1a2e (diff)
avformat/http: prevent truncation of sanitized_path
path1 and sanitized_path are both MAX_URL_SIZE bytes long, yet the latter is copied from the former with the addition of one extra character. Should fix a -Wformat-truncation warning. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index fdfbc69da1..91650be47a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -194,7 +194,7 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options)
char *hashmark;
char hostname[1024], hoststr[1024], proto[10];
char auth[1024], proxyauth[1024] = "";
- char path1[MAX_URL_SIZE], sanitized_path[MAX_URL_SIZE];
+ char path1[MAX_URL_SIZE], sanitized_path[MAX_URL_SIZE + 1];
char buf[1024], urlbuf[MAX_URL_SIZE];
int port, use_proxy, err, location_changed = 0;
HTTPContext *s = h->priv_data;