POV-Ray : Newsgroups : povray.programming : Possible problem in Mac source : Re: Possible problem in Mac source Server Time
29 Jul 2024 00:30:21 EDT (-0400)
  Re: Possible problem in Mac source  
From: Thorsten Froehlich
Date: 14 Nov 1999 11:02:29
Message: <382edd15@news.povray.org>
In article <382E63E2.44D8BD9E@geocities.com> , "Jon A. Cruz" 
<jon### [at] geocitiescom> wrote:

> NO NONO NONONONONONONNO!!!!!!!!
> aaaaaaaaaaaaaahhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!
>
> (sorry, but I sometimes panic at potentially dangerous code)  :-)

Yes!!!!!!!

> Wouldn't it be safer to change it to something like
>
> [taking a wild guess without having the mac sources around]
>
> char povVers[ sizeof(POV_RAY_VERSION) + 1 ];
> or
> char *povVers = (char *)malloc( sizeof(POV_RAY_VERSION) + 1 );

Yes, that would have been better a long time ago, but keep two things in
mind:
First, that usually this string is a version number which shouldn't be that
long after all, i.e. "3.1g.r1" is only 10 bytes so 16 is safe for all
official cases.
Second, the Mac 3.1 code will be replaced completely with 3.5, so it makes
no sense to fix something that will never be used again, nor to invest even
a few seconds into it if those can be spend better on 3.5 :-)


      Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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