🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Richard Ohnemus Thu, 27 Jun 1991 15:30
Bad free in lib/libc/gen/glob.c
#397
Author: Richard Ohnemus
Date: Thu, 27 Jun 1991 15:30
28 lines
1305 bytes
This is a patch to glob.c from uunet ~/bsd-sources/lib/libc/gen/glob.c

The function globfree tries to free an invalid pointer instead of the
array of path pointers.

*** glob.c.old	Thu Jun 27 10:28:28 1991
--- glob.c	Thu Jun 27 10:22:16 1991
***************
*** 413,418 ****
  		for (i = pglob->gl_pathc; i--; ++pp)
  			if (*pp)
  				(void)free(*pp);
! 		(void)free((char *)pp);
  	}
  }
--- 413,418 ----
  		for (i = pglob->gl_pathc; i--; ++pp)
  			if (*pp)
  				(void)free(*pp);
! 		(void)free((char *)pglob->gl_pathv);
  	}
  }
-- 
Rick Ohnemus   INTERNET: rick@sparky.IMD.Sterling.COM   UUCP: uunet!sparky!rick
LAND: Sterling Software IMD, 1404 Ft. Crook Rd. South, Bellevue NE. 68005-2969
Phone: (402) 291-8300        FAX: (402) 291-4362
I never receive credit for anything I write! (I'm an Ohnemus. 8-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads