mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix relative path checking in get_exe_path, plus a signed comparison
This commit is contained in:
parent
d3baa0d1f7
commit
5494e4e6fd
1 changed files with 2 additions and 2 deletions
|
@ -778,7 +778,7 @@ std::string get_exe_path(const std::string& invocation)
|
|||
// Absolute path
|
||||
return invocation;
|
||||
|
||||
if ( invocation_path.is_relative() )
|
||||
if ( invocation_path.is_relative() && invocation_path.has_parent_path() )
|
||||
{
|
||||
// Relative path
|
||||
char cwd[PATH_MAX];
|
||||
|
@ -1620,7 +1620,7 @@ const char* fmt_bytes(const char* data, int len)
|
|||
const char* vfmt(const char* format, va_list al)
|
||||
{
|
||||
static char* buf = nullptr;
|
||||
static unsigned int buf_len = 1024;
|
||||
static int buf_len = 1024;
|
||||
|
||||
if ( ! buf )
|
||||
buf = (char*)safe_malloc(buf_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue