bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34180: 27.0.50; argv[0] used incorrectly to find the .pdmp


From: Daniel Colascione
Subject: bug#34180: 27.0.50; argv[0] used incorrectly to find the .pdmp
Date: Sat, 26 Jan 2019 19:54:29 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 1/23/19 8:07 AM, Stefan Monnier wrote:
Package: Emacs
Version: 27.0.50


Currently, the first .pdmp file that we try to load is found by adding
".pdmp" to argv[0].
This has 2 problems:

1- It fails miserably if argv[0] is a name relative to $PATH since it
    performs the lookup relative to $PWD instead, which is additionally
    a security issue.

2- If the executable named by argv[0] is a symlink, it does not try to
    follow the symlink in case the .pdmp is stored next to the
    destination rather than next to the source.

Yep. We should definitely fix that. realpath on argv[0] seems like the right thing.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]