Date: Thu, 5 Apr 2012 18:47:55 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233927 - head/libexec/rtld-elf Message-ID: <201204051847.q35Iltbe072250@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Apr 5 18:47:54 2012 New Revision: 233927 URL: http://svn.freebsd.org/changeset/base/233927 Log: Properly handle absent AT_CANARY aux entry. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Apr 5 18:43:27 2012 (r233926) +++ head/libexec/rtld-elf/rtld.c Thu Apr 5 18:47:54 2012 (r233927) @@ -351,7 +351,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ main_argc = argc; main_argv = argv; - if (aux_info[AT_CANARY]->a_un.a_ptr != NULL) { + if (aux_info[AT_CANARY] != NULL && + aux_info[AT_CANARY]->a_un.a_ptr != NULL) { i = aux_info[AT_CANARYLEN]->a_un.a_val; if (i > sizeof(__stack_chk_guard)) i = sizeof(__stack_chk_guard);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204051847.q35Iltbe072250>