• INN

    From doctor@doctor@doctor.nl2k.ab.ca (The Doctor) to news.software.nntp on Thu Aug 6 13:54:59 2026
    From Newsgroup: news.software.nntp

    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!
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Julien_=C3=89LIE?=@iulius@nom-de-mon-site.com.invalid to news.software.nntp on Thu Aug 6 20:27:04 2026
    From Newsgroup: news.software.nntp

    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 rCyOpenArticlerCO: tradspool/tradspool.c:816:38: error: comparison of integer expressions
    of different signedness: rCy__off_trCO {aka rCylong intrCO} and rCyunsigned intrCO
    [-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 |eLIE

    -2-aIl vaut mieux un tapis persan vol|- qu'un tapis volant perc|--a!-a-+
    (Ast|-rix)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Russ Allbery@eagle@eyrie.org to news.software.nntp on Thu Aug 6 12:19:28 2026
    From Newsgroup: news.software.nntp

    Julien |eLIE <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.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Julien_=C3=89LIE?=@iulius@nom-de-mon-site.com.invalid to news.software.nntp on Fri Aug 7 00:06:57 2026
    From Newsgroup: news.software.nntp

    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 |eLIE

    -2-arCo Nous ne connaissons pas leur langue, donc, sous aucun pr|-texte il ne
    faut parler aux Goths-a!
    rCo Mais on peut leur taper dessus-a?-a-+ (Ast|-rix)

    --- Synchronet 3.22a-Linux NewsLink 1.2