aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCameron Paul <cpaul37@gmail.com>2025-03-28 10:46:38 -0500
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-05-01 00:56:42 +0200
commit3eeb7842f51e431f0ae2160bed2bdca8e53e5c52 (patch)
treea895368ccff21c9bcb4b8baabcd5127e980fe5ed /src
parent675e4057bae380395a9198bfbfe4066ae1fa4675 (diff)
Fix off by one error with quoted filenames
Diffstat (limited to 'src')
-rw-r--r--src/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c
index 7a9b73cd..f9e79177 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -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 == '\\';