POV-Ray : Newsgroups : povray.off-topic : update, updates, updates : Re: update, updates, updates Server Time
29 Jul 2024 02:19:52 EDT (-0400)
  Re: update, updates, updates  
From: Warp
Date: 18 Jan 2013 13:55:36
Message: <50f99aa8@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Okay, let's do it a bit more specific:

>    void fubar(int idx)
>    {
>      char c[1024];
>      if (idx < 1024)
>        fnord(c[idx]);
>      else
>        FAIL_SAFE();
>    }

>    void main()
>    {
>      fubar(INT_MAX+1);
>    }

> No out-of-bounds access? Look at the code again.

But in the original post it was suggested that an array size of INT_MAX+1
in the image file could cause this. Here the array size is just 1024 (which
in this particular contest would have ostensibly been read from the image
file.)

Unless there's an image file where there are actual index values specified.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.