* spawn.cc (find_exec): Initialize err (CID 60111).
* strace.cc (strace::activate): Fix potential buffer overrun (CID 59938) * syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on error to avoid resource leak (CID 59981). * thread.cc (pthread::exit): Avoid accessing cygtls member after deleting "this" (CID 60217).
This commit is contained in:
		| @@ -511,6 +511,7 @@ void | ||||
| pthread::exit (void *value_ptr) | ||||
| { | ||||
|   class pthread *thread = this; | ||||
|   bool is_main_tls = (cygtls == _main_tls); // Check cygtls before deleting this | ||||
|  | ||||
|   // run cleanup handlers | ||||
|   pop_all_cleanup_handlers (); | ||||
| @@ -536,7 +537,7 @@ pthread::exit (void *value_ptr) | ||||
|     ::exit (0); | ||||
|   else | ||||
|     { | ||||
|       if (cygtls == _main_tls) | ||||
|       if (is_main_tls) | ||||
| 	{ | ||||
| 	  _cygtls *dummy = (_cygtls *) malloc (sizeof (_cygtls)); | ||||
| 	  *dummy = *_main_tls; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user