Re: [PATCH v3 3/9] diffcore-rename: simplify limit check
- From
- Başar Uğur <basarugur@gmail.com>
- Date
- Nov 9, 2021, 21:14 UTC
- Message-ID
- <CAPNYHkm5Qp8HQGU5_6DXc7xpCrdGgEin0WYAxbRNOkKW0j2ERQ@mail.gmail.com>
- In-Reply-To
- <7214fa73fdd13418744903f6c769fdb77c9512ce.1609272328.git.gitgitgadget@gmail.com>
Hi all,
First post on Git mailing list, to provide a comment on a patch. Hope this works.
In cases where the `rename_limit` is already greater than 65535, the `st_mult(rename_limit, rename_limit)` multiplication overflows and process halts. But I don't think an 'overflow error' is very helpful for the users in understanding what is wrong with their configuration; i.e. `diff.renameLimit` documentation says nothing about a 'maximum allowed value'. I would either clamp it to a reasonable range, or inform the users about the limits, or maybe both.
Cheers,
-- Basar