sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
* libXg bug fix
@ 1998-09-15 23:03 Mark H. Wilkinson
  0 siblings, 0 replies; only message in thread
From: Mark H. Wilkinson @ 1998-09-15 23:03 UTC (permalink / raw)
  To: bobf; +Cc: sam-fans

This fixes a bug in ffree() in sam's libXg. c is a pointer to a
structure within an array of such structures, and as such shouldn't
be free'd. The later call to free(f->subf) frees the whole array.

I should point out that sam doesn't actually call ffree() anywhere,
so it's not going to fall over because of this. Other programs might.

-Mark.

Index: rdfontfile.c
===================================================================
RCS file: /u/cvs/9libs/libXg/rdfontfile.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C4 -r1.4 -r1.5
*** rdfontfile.c	1998/08/11 00:20:44	1.4
--- rdfontfile.c	1998/09/15 23:03:22	1.5
***************
*** 126,134 ****
  		c = f->subf+i;
  		if (c->f)
  			subffree(c->f);
  		free(c->name);
- 		free(c);
  	}
  	free(f->subf);
  	free(f);
  }
--- 126,133 ----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-09-17  6:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-15 23:03 libXg bug fix Mark H. Wilkinson

sam-fans - fans of the sam editor

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/sam-fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sam-fans sam-fans/ http://inbox.vuxu.org/sam-fans \
		sam-fans@hawkwind.utcs.toronto.edu
	public-inbox-index sam-fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.sam-fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git