Re: [PATCH] time: fix a assignment error in ntp module
From: Thomas Gleixner
Date: Mon Jun 17 2019 - 08:19:57 EST
On Mon, 17 Jun 2019, çåç wrote:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
> Yes,the >UINT_MAX value can be passed by
> syscall adjtimex->do_adjtimex->__do_adjtimex->process_adjtimex_modes by the
> proper arugments.
So there is clearly some sanity check missing, but surely not that
type cast.
> > > - if (txc->modes & ADJ_TAI && txc->constant > 0)
> > > + if (txc->modes & ADJ_TAI && (int)txc->constant > 0)
> > > *time_tai = txc->constant;
> >
> > The way more interesting question is whether txc->constant can be >
> > UINT_MAX. In that case the txc->constant would be truncated.
> >
> > Miroslav?
Thanks,
tglx