|
|
On Sun, 03 Dec 2000 21:06:16 -0600, David F wrote:
>When i try to render a file in my home directory, using MegaPOV 0.5a, I
>get the following output:
>
>Persistence of Vision(tm) Ray Tracer Version 3.1g.ump.0.5a (UniMegaPov
>0.5a).u
><snip>
>Creating vista buffer.
>Creating light buffers...
>File init error.
>Error opening output file.
>$
>
>However, when I run it su, it renders. Got any suggestions?
>
Try the following patch to get a meaningful error message.
BTW, for those who run public render farms: I just noticed that the
Error function uses sprintf on a fixed size buffer. It may be possible
to overflow this buffer and run arbitrary programs. Make sure the user
running povray doesn't have more than the rights he absolutely needs!
hp
--- povray.c.orig Thu Jun 1 14:43:52 2000
+++ povray.c Mon Dec 4 20:03:46 2000
@@ -32,6 +32,7 @@
*****************************************************************************/
#include <ctype.h>
+#include <errno.h>
#include <time.h> /* BP */
#include "frame.h" /* common to ALL modules in this program */
#include "povproto.h"
@@ -1445,7 +1446,8 @@
&Frame.Screen_Width, &Frame.Screen_Height, Buffer_Size,
WRITE_MODE) != 1)
{
- Error ("Error opening output file.");
+ Error ("Error opening output file `%s': %s\n",
+ Actual_Output_Name, strerror(errno));
}
CHANGEFILETYPE
}
@@ -1456,7 +1458,8 @@
&Frame.Screen_Width, &Frame.Screen_Height, Buffer_Size,
WRITE_MODE) != 1)
{
- Error ("Error opening output file.");
+ Error ("Error opening output file `%s': %s\n",
+ Actual_Output_Name, strerror(errno));
}
CHANGEFILETYPE
--- render.c.orig Fri Sep 8 22:18:40 2000
+++ render.c Mon Dec 4 20:00:51 2000
@@ -31,6 +31,7 @@
*
******************************************************************************/
+#include <errno.h>
#include <time.h>
#include "frame.h"
#include "vector.h"
@@ -857,7 +858,8 @@
&Frame.Screen_Width, &Frame.Screen_Height, opts.File_Buffer_Size,
APPEND_MODE) != 1)
{
- Error("Error opening output file.\n");
+ Error("Error opening output file `%s': %s.\n",
+ New_Fname, strerror(errno));
}
return;
--
_ | Peter J. Holzer | Es war nicht Gegenstand der Abstimmung zu
| | | hjp### [at] wsracat | Zahlen neu festzulegen.
__/ | http://www.hjp.at/ | -- Johannes Schwenke <jby### [at] ginkode>
Post a reply to this message
|
|