On Mon, 17 Apr 2017 17:12:13 +0200, Mark Kettenis wrote:
> > From: "Todd C. Miller"
> > Date: Mon, 17 Apr 2017 08:49:26 -0600
> >
> > Maybe use UINT_MAX since st_size gets cast to u_int below?
> > Either way OK millert@
>
> Already committed. But INT_MAX is better
> From: "Todd C. Miller"
> Date: Mon, 17 Apr 2017 08:49:26 -0600
>
> Maybe use UINT_MAX since st_size gets cast to u_int below?
> Either way OK millert@
Already committed. But INT_MAX is better anyway since there is a cast
to int as well and INT_MAX < UINT_MAX.
Maybe use UINT_MAX since st_size gets cast to u_int below?
Either way OK millert@
- todd
The db-3 subtest fails on 64-bit systems (and has been failing for a
long time, maybe forever?). The problem is that (off_t)SIZE_MAX
becomes -1, so the
if (sb.st_size > (off_t)SIZE_MAX)
condition is always true. Since we pass (int)sb.st_size to read(2), I
think checking for INT_MAX is