You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
avformat/urldecode: fix decoding last char if it was percent encoded
The length check was too strict and if the end of the string was a percent encoded sequence it did not decode correctly. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -50,7 +50,7 @@ char *ff_urldecode(const char *url, int decode_plus_sign)
|
||||
while (s < url_len) {
|
||||
c = url[s++];
|
||||
|
||||
if (c == '%' && s + 2 < url_len) {
|
||||
if (c == '%' && s + 1 < url_len) {
|
||||
char c2 = url[s++];
|
||||
char c3 = url[s++];
|
||||
if (av_isxdigit(c2) && av_isxdigit(c3)) {
|
||||
|
||||
Reference in New Issue
Block a user