* [FFmpeg-devel] [PATCH] libavformat: increase MAX_URL_SIZE
@ 2023-10-28 13:04 WooDzu
2023-11-08 15:32 ` Anton Khirnov
0 siblings, 1 reply; 2+ messages in thread
From: WooDzu @ 2023-10-28 13:04 UTC (permalink / raw)
To: ffmpeg-devel
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
With the rise of object storage, like S3, it is not uncommon to generate
long pre-signed URLs. When a pre-signed URL is generated using a
short-lived credentials it may include a query parameter called
X-Amz-Security-Token that is 4kB on its own.
The current MAX_URL_SIZE will trim the URL with no any errors or
warnings and the request will fail with a http 400 error.
Signed-off-by: Piotr Gasiorowski <piotr@lwks.com>
---
libavformat/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 7702986c9c..d6465bad7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
#include "avformat.h"
-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192
/** size of probe buffer, for guessing file type from file contents */
#define PROBE_BUF_MIN 2048
--
2.39.2 (Apple Git-143)
[-- Attachment #2: 0001-libavformat-increase-MAX_URL_SIZE.patch --]
[-- Type: text/x-patch, Size: 1091 bytes --]
From bfc0dc3e68f1d1cec33084bbea0dd87e19d325d5 Mon Sep 17 00:00:00 2001
From: Piotr Gasiorowski <piotr@lwks.com>
Date: Sat, 28 Oct 2023 14:00:38 +0200
Subject: [PATCH] libavformat: increase MAX_URL_SIZE
With the rise of object storage, like S3, it is not uncommon to generate
long pre-signed URLs. When a pre-signed URL is generated using a
short-lived credentials it may include a query parameter called
X-Amz-Security-Token that is 4kB on its own.
The current MAX_URL_SIZE will trim the URL with no any errors or
warnings and the request will fail with a http 400 error.
Signed-off-by: Piotr Gasiorowski <piotr@lwks.com>
---
libavformat/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 7702986c9c..d6465bad7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
#include "avformat.h"
-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192
/** size of probe buffer, for guessing file type from file contents */
#define PROBE_BUF_MIN 2048
--
2.39.2 (Apple Git-143)
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] libavformat: increase MAX_URL_SIZE
2023-10-28 13:04 [FFmpeg-devel] [PATCH] libavformat: increase MAX_URL_SIZE WooDzu
@ 2023-11-08 15:32 ` Anton Khirnov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Khirnov @ 2023-11-08 15:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting WooDzu (2023-10-28 15:04:38)
> With the rise of object storage, like S3, it is not uncommon to generate
> long pre-signed URLs. When a pre-signed URL is generated using a
> short-lived credentials it may include a query parameter called
> X-Amz-Security-Token that is 4kB on its own.
> The current MAX_URL_SIZE will trim the URL with no any errors or
> warnings and the request will fail with a http 400 error.
Why do we have a static limit in the first place? Wouldn't it be better
to make the relevant strings dynamically allocated?
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-08 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-28 13:04 [FFmpeg-devel] [PATCH] libavformat: increase MAX_URL_SIZE WooDzu
2023-11-08 15:32 ` Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git