X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SFJwNL+sKCFkeQEFBOAiccTeyTqdHcBnD8KJhLiLLpo=; b=M80aGStEyo3w/V3rMYYg63tIcTTnlmMgW1ARqU5O9ydOJb8kIQ0oZeBPAnomvDdXy9 v2AFTlGRx7oAAajCbXzNZR0dD0b4/HeCGlZy8haXFsCd4PnIO82NmgCZ/mxfEvGcJI1a pCx86czNyxSto80P3Wv5VneRr3djvXBLG8zyaTxhXEYYRilFcDv4vdCHF9jE9xwTCNOu 0YkxlBgxrNo9Wy7Rp/uWzE5Q/MT5q6RCpGNySZiG3KQcmiCescbtZ8Simd10d0jG41cw CrrCAdpYfxN22mzlb8nx+XgnD/20bzmbu9EZhdq2uNPLfjU81drNceW74wPwWalFBfCI OJ3Q== MIME-Version: 1.0 X-Received: by 10.60.95.197 with SMTP id dm5mr24448733oeb.76.1442425451269; Wed, 16 Sep 2015 10:44:11 -0700 (PDT) In-Reply-To: References: Date: Wed, 16 Sep 2015 20:44:11 +0300 Message-ID: Subject: Re: dlopen.c: make sure filename is not NULL and not empty From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com Content-Type: text/plain; charset=UTF-8 Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 9/16/15, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com] wrote: > Looks ok to me but my man page tells something like this: > "If filename is NULL, then the returned handle is for the main program." > What shall this imply for DJGPP? djgpp version doesn't do that. However, dlsym(NULL,somemode) is usually used to get a global symbol exposed onto the main program and the djgpp version can do dlsym(RTLD_DEFAULT,"somesym") for that purpose with the limitation of "somesym" must be from a loaded dxe file which is loaded with RTLD_GLOBAL. > Neitherless we should always test for NULL pointer. > Patch is applied to both HEAD and to v2_05_1 branch.