]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/POP3.pm
pop3: fix off-by-one error when handling `EXPIRE 0'
[public-inbox.git] / lib / PublicInbox / POP3.pm
index bd7dfc6583890901974febd0ed36d536e3403e4c..19fcc434b3483b73a8f7be0327fa7f074ce03e6a 100644 (file)
@@ -233,7 +233,7 @@ sub retr_cb { # called by git->cat_async via ibx_async_cat
                my @tmp = split(/^/m, $bdy);
                $hdr .= join('', splice(@tmp, 0, $top_nr));
        } elsif (exists $self->{expire}) {
-               $self->{expire} .= pack('S', $off + 1);
+               $self->{expire} .= pack('S', $off);
        }
        $$bref =~ s/^\./../gms;
        $$bref .= substr($$bref, -2, 2) eq "\r\n" ? ".\r\n" : "\r\n.\r\n";