lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV infinte loop at HTFWriter.c:669 in new temp patch


From: Jonathan Sergent
Subject: LYNX-DEV infinte loop at HTFWriter.c:669 in new temp patch
Date: Mon, 14 Jul 1997 17:31:44 -0500

Yup, you're right.  I didn't bother to verify Fote's logic for checking
to see if the spoof check had already been done.

A supplemental diff:
diff -crN fix0/lynx2-7-1/src/HTFWriter.c lynx2-7-1/src/HTFWriter.c
*** fix0/lynx2-7-1/src/HTFWriter.c      Mon Jul 14 17:15:59 1997
--- lynx2-7-1/src/HTFWriter.c   Mon Jul 14 17:10:15 1997
***************
*** 689,698 ****
            } else if ((suffix = HTFileSuffix(pres->rep)) && *suffix == '.') {
                strcat(fnam, suffix);
                /*
!                *  It's not one of the suffixes checked for a
                 *  spoof in tempname(), so check it now. - FM
                 */
  #ifdef HAS_OPEN
                  original_umask = umask(077);
                if ((fd = open(fnam, O_CREAT|O_EXCL|O_RDWR, 0600)) == -1) {
                    if (TRACE)
--- 689,699 ----
            } else if ((suffix = HTFileSuffix(pres->rep)) && *suffix == '.') {
                strcat(fnam, suffix);
                /*
!                *  It might not be one of the suffixes checked for a
                 *  spoof in tempname(), so check it now. - FM
                 */
  #ifdef HAS_OPEN
+                 remove(fnam);       /* not sure if tempname checked or not */
                  original_umask = umask(077);
                if ((fd = open(fnam, O_CREAT|O_EXCL|O_RDWR, 0600)) == -1) {
                    if (TRACE)
...

A new diff altogether is posted where the old one is.  This one should
apply with patch -p1 (the other one needed patch -p5!)

The diffs are available at the io.com address I posted before.

Broken out trees are at http://csociety.ecn.purdue.edu/~sergent/lynx/
where I have more space.


-- 
Jonathan Sergent / address@hidden / address@hidden
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]