[patch] dlfcn/dlerror.c: dlerror(): Check for result->errstring being NULL

Ben Collins bcollins@debian.org
Mon Jan 1 14:46:00 GMT 2001


The problem appeared when dlerror() was called before anything was
dlopen()'d ("int main() {dlerror();}"), which caused a segfault. The
problem was that last_result is unitialized at this point, and that case
isn't checked for before trying to strcmp result->errstring. This patch
fixes that case, and returns NULL, just as if there were no errors
(which there aren't).

2001-01-01  Ben Collins  <bcollins@debian.org>

	* dlfcn/dlerror.c: dlerror(): Check for result->errstring being
	  NULL.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'


More information about the Libc-alpha mailing list