diff options
author | Cameron Paul <cpaul37@gmail.com> | 2025-03-28 10:46:38 -0500 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-05-01 00:56:42 +0200 |
commit | 3eeb7842f51e431f0ae2160bed2bdca8e53e5c52 (patch) | |
tree | a895368ccff21c9bcb4b8baabcd5127e980fe5ed | |
parent | 675e4057bae380395a9198bfbfe4066ae1fa4675 (diff) |
Fix off by one error with quoted filenames
-rw-r--r-- | src/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -394,7 +394,7 @@ void a_Misc_parse_content_disposition(const char *disposition, char **type, char const char *c; unsigned int maxlen = strlen(s); for (c = s; !(*c == '"' && !escaped); c++) { - if ((len = c - s) == maxlen) { + if ((len = c - s + 1) > maxlen) { return; } escaped = *c == '\\'; |