mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
32 lines
811 B
Plaintext
32 lines
811 B
Plaintext
$NetBSD: patch-al,v 1.1 2005/10/05 11:45:46 salo Exp $
|
|
|
|
Fix for SA17008, from Gentoo.
|
|
|
|
--- ../convert/vidtoppm.c.orig 1995-01-20 04:25:40.000000000 +0100
|
|
+++ ../convert/vidtoppm.c 2005-10-05 13:16:27.000000000 +0200
|
|
@@ -220,9 +220,11 @@
|
|
|
|
|
|
sprintf(ofname, "%s%d.ppm", obase, i);
|
|
- outFile = fopen("/tmp/foobar", "w");
|
|
+ sprintf(tempfile, "%s%d.ppm.tmp", obase, i);
|
|
+ outFile = fopen(tempfile, "w");
|
|
if (!outFile) {
|
|
perror("Couldn't open output file.");
|
|
+ exit(1);
|
|
}
|
|
|
|
for (r=0; r<height; r++) {
|
|
@@ -238,8 +240,9 @@
|
|
|
|
free(tdata);
|
|
|
|
- sprintf(command, "rawtoppm %d %d < /tmp/foobar > %s",
|
|
- width, height, ofname);
|
|
+ sprintf(command, "rawtoppm %d %d < %s > %s",
|
|
+ width, height, tempfile, ofname);
|
|
system(command);
|
|
+ unlink(tempfile);
|
|
}
|
|
}
|