Re: [PATCH v2 3/3] imap: replace atoi() with strtol_i() for UIDVALIDITY and UIDNEXT parsing
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 21, 2024, 12:20 UTC
- Message-ID
- <ZxZHIk-gH0Onpt15@pks.im>
- In-Reply-To
- <c09c7b3df0d7eac3069cee45cddc49a76da2503e.1729259580.git.gitgitgadget@gmail.com>
On Fri, Oct 18, 2024 at 01:53:00PM +0000, Usman Akinyemi via GitGitGadget wrote:
Show 6 quoted lines
> From: Usman Akinyemi <usmanakinyemi202@gmail.com> > > Replaced unsafe uses of atoi() with strtol_i() to improve error handling > when parsing UIDVALIDITY, UIDNEXT, and APPENDUID in IMAP commands. > Invalid values, such as those with letters, > now trigger error messages and prevent malformed status responses.
The line break after "letters," is a bit funny.
It would also be nice to point out why this commit doesn't add any new tests. I guess the answer is that we don't have any tests for git-imap-send(1) at all, which is too bad, but a fair excuse and not a problem of your patch. So introducing such tests would be too much to ask.
Patrick