Thread View: news.software.nntp
4 messages
4 total messages
Started by The Doctor
Thu, 06 Aug 2026 13:54
INN
Author: The Doctor
Date: Thu, 06 Aug 2026 13:54
Date: Thu, 06 Aug 2026 13:54
7 lines
1071 bytes
1071 bytes
What is happenibng to INN dailies? the last one happened on 20260804 . -- Member - Liberal International This is doctor@nk.ca Ici doctor@nk.ca Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism ; 31 years in the ISP business!
Re: INN snapshots
Author: Julien ĂLIE
Date: Thu, 06 Aug 2026 18:27
Date: Thu, 06 Aug 2026 18:27
34 lines
2250 bytes
2250 bytes
Hi The Doctor,
> What is happenibng to INN dailies?
> the last one happened on 20260804.
Thanks for reporting that!
There was a warning during the build of INN, due to a change the
previous day, which prevented the build to continue.
tradspool/tradspool.c: In function âOpenArticleâ:
tradspool/tradspool.c:816:38: error: comparison of integer expressions
of different signedness: â__off_tâ {aka âlong intâ} and âunsigned intâ
[-Werror=sign-compare]
816 | if (sb.st_size < 0 || sb.st_size > UINT_MAX) {
| ^
cc1: all warnings being treated as errors
I have just committed a fix:
- if (sb.st_size < 0 || sb.st_size > UINT_MAX) {
+ if (sb.st_size < 0 || (unsigned int) sb.st_size > UINT_MAX) {
The snapshots should be generated tomorrow.
--
Julien ĂLIE
« Il vaut mieux un tapis persan volé qu'un tapis volant percé ! »
(Astérix)
Re: INN snapshots
Author: Russ Allbery
Date: Thu, 06 Aug 2026 19:19
Date: Thu, 06 Aug 2026 19:19
22 lines
1720 bytes
1720 bytes
Julien ĂLIE <iulius@nom-de-mon-site.com.invalid> writes:
> I have just committed a fix:
> - if (sb.st_size < 0 || sb.st_size > UINT_MAX) {
> + if (sb.st_size < 0 || (unsigned int) sb.st_size > UINT_MAX) {
> The snapshots should be generated tomorrow.
This is a weird check and I don't entirely understand the point of it, but
sb.st_size is off_t which can be longer than unsigned int (and I think
*can* even be larger than unsigned long since it could be a signed long
long), so doing the cast that way risks overflow and a false negative on
the comparison, I think. Instead, I think you want:
if (sb.st_size < 0 || sb.st_size > (off_t) UINT_MAX) {
--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN snapshots
Author: Julien ĂLIE
Date: Thu, 06 Aug 2026 22:06
Date: Thu, 06 Aug 2026 22:06
33 lines
2638 bytes
2638 bytes
Hi Russ,
>> - if (sb.st_size < 0 || sb.st_size > UINT_MAX) {
>> + if (sb.st_size < 0 || (unsigned int) sb.st_size > UINT_MAX) {
>
>
> This is a weird check and I don't entirely understand the point of it
This check was added to harden the validation of article size when
opening the (tradspool) file, and fail before mmap'ing it in case its
size is totally abnormal. It should not occur on normal operations (no
article of that size is ever written) but may if the spool was tampered
(and there is enough capacity on the disk to store the article).
https://github.com/InterNetNews/inn/commit/4b7f6862e88514deabb97ecc5bc814d11a1ffb56#diff-91414faa9de6f861d80330fdc6e3effb03cb905fe879b0e6aebc2ea734b662d6
> sb.st_size is off_t which can be longer than unsigned int (and I think
> *can* even be larger than unsigned long since it could be a signed long
> long), so doing the cast that way risks overflow and a false negative on
> the comparison, I think. Instead, I think you want:
>
> if (sb.st_size < 0 || sb.st_size > (off_t) UINT_MAX) {
Yes indeed, thanks for noticing.
--
Julien ĂLIE
« â Nous ne connaissons pas leur langue, donc, sous aucun prĂ©texte il ne
faut parler aux Goths !
â Mais on peut leur taper dessus ? » (AstĂ©rix)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads