W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

Minor Patch to tidy (fwd)

From: Dave Raggett <dsr@w3.org>
Date: Thu, 21 Feb 2002 08:35:33 +0000 (GMT Standard Time)
To: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10202210835120.-967031@hazel>
---------- Forwarded message ----------
Date: Wed, 20 Feb 2002 11:38:45 -0800
From: Sean Kamath <kamath@cesa.opbu.xerox.com>
To: dsr@w3.org, terry_teague@users.sourceforge.net
Subject: Minor Patch to tidy

Hello.

Running "tidy -show-config" would core-dump on my Solaris 8 Sparc when
printing the current slide-type.  I've attached a patch for config.c
which makes sure that if there is a null pointer for any "Name" it is
converted to a pointer to an empty string.

Perhaps instead tidy_out should check to make sure a string isn't a
null pointer, but this was the easiest for me to quickly fix.

Thanks.

Sean Kamath

PS I sent this to you guys because you're listed as contributing
authors in the Makefile.  If you are not the correct people, please
forward or let me know.  Thanks again.


*** /share/src/util/tidy/src/config.c	Sun Jan 27 23:50:06 2002
--- config.c	Wed Feb 20 11:26:40 2002
***************
*** 1287,1296 ****
                   wstrcasecmp(configItem->name, "language") )
                  continue;
              */
!             if (showCurrent)
!                  vals = *(configItem->location.string);
!              else
!                  vals = "" /* "whole word only" */;
           }
  
          else if ( configItem->parser == ParseTagNames )
--- 1287,1299 ----
                   wstrcasecmp(configItem->name, "language") )
                  continue;
              */
!             if (showCurrent) {
! 	      vals = *(configItem->location.string);
! 	      if (!vals)
! 		vals = "";
! 	    }
! 	    else
! 	      vals = "" /* "whole word only" */;
           }
  
          else if ( configItem->parser == ParseTagNames )
Received on Thursday, 21 February 2002 03:35:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT