$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 %s", - width, height, ofname); + sprintf(command, "rawtoppm %d %d < %s > %s", + width, height, tempfile, ofname); system(command); + unlink(tempfile); } }