* libc/bsdlib.cc (forkpty): Close master and slave if fork fails to

avoid resource leak (CID 59997).
	* libc/fts.c: Update to FreeBSD version 1.39 (CID 59947).
	* libc/minires.c (minires_get_search): Fix out-of-bounds read from
	words array (CID 59937).
This commit is contained in:
Corinna Vinschen
2014-05-22 09:45:17 +00:00
parent 59ce289027
commit ed2cfab440
4 changed files with 85 additions and 111 deletions

View File

@ -150,6 +150,8 @@ forkpty (int *amaster, char *name, const struct termios *termp,
switch (pid = fork ())
{
case -1:
close (master);
close (slave);
return -1;
case 0:
close (master);