Skip to content

Commit

Permalink
Qremote: break quoted-printable detection earlier if header needs lin…
Browse files Browse the repository at this point in the history
…e wrap

In case the header needs linewrapping the result flag will have bit 2 (i.e. 0x4)
set, so the condition for early termination was never met. Also use a named
value instead of magic number.
  • Loading branch information
DerDakon committed Sep 30, 2023
1 parent 815da90 commit 10aa357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qremote/qrdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ need_recode(const char *buf, off_t len)
int long_flag = recode_long_header;
off_t pos = 0;

while ((pos < len) && (res != 3)) {
while ((pos < len) && ((res & recode_qp_body) != recode_qp_body)) {
if (llen > 998) {
res |= long_flag;
}
Expand Down

0 comments on commit 10aa357

Please sign in to comment.