mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00: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:
parent
b0314dc76e
commit
23cf2c5f01
1 changed files with 1 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue