Commit 781bd3c
authored
mail: invalid message number accepted (briandfoy#983)
* I exported a mailbox with 24 items in mbox format
* The maximum valid message id is 24, but a very long number is interpreted as 24
* Another long message id is rejected, so this made me scratch my head
* perl debugger shows that the invalid message number errors for 0, 25 and 1111111111 are from L842 in main::msg_print()
* mailbox::messagex() takes the very long message id and returns a valid message instead of undef
* mailbox::messagex() has a guard for negative array index, but does not guard against index past end of array
* Adding an index guard fixes the problem on my system1 parent 4555c26 commit 781bd3c
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
476 | 478 | | |
477 | 479 | | |
478 | 480 | | |
| |||
640 | 642 | | |
641 | 643 | | |
642 | 644 | | |
643 | | - | |
| 645 | + | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
| |||
0 commit comments