This commit is contained in:
marc 1999-01-31 00:05:45 +00:00
parent 384c27d1fb
commit 731905c32a
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,31 @@
--- xpdf/Stream.cc.orig Fri Jan 15 13:15:47 1999
+++ xpdf/Stream.cc Fri Jan 15 13:30:04 1999
@@ -719,6 +719,7 @@
void LZWStream::reset() {
FILE *f;
+ int fd;
str->reset();
bufPtr = bufEnd = buf;
@@ -734,9 +735,10 @@
strcpy(zCmd, uncompressCmd);
strcat(zCmd, " ");
zName = zCmd + strlen(zCmd);
- tmpnam(zName);
+ strcat(zName,"/tmp/xpdf.XXXXXX");
strcat(zName, ".Z");
- if (!(f = fopen(zName, "wb"))) {
+ fd=mkstemps(zName,strlen(".Z"));
+ if (!(f = fdopen(fd, "w"))) {
error(getPos(), "Couldn't open temporary file '%s'", zName);
return;
}
@@ -752,6 +754,7 @@
#ifdef VMS
if (!system(zCmd)) {
#else
+ /* THIS IS AWFULL! */
if (system(zCmd)) {
#endif
error(getPos(), "Couldn't execute '%s'", zCmd);

View File

@ -0,0 +1,6 @@
${WRKDIR}/xpdf/Stream.cc
fixed tmpnam warnings.
This package seems to be BAD about security. It probably needs alot more
looking into. Although it is only a user program, no suid, etc.