Sysinternals / ProcDump-for-Linux

A Linux version of the ProcDump Sysinternals tool
MIT License
2.93k stars 302 forks source link

Procdump crashes when TMPDIR is defined #182

Closed MarioHewardt closed 1 year ago

MarioHewardt commented 1 year ago

Expected behavior

Procdump success.

Actual behavior

ProcDump crashes (invalid free)

Steps to reproduce the behavior

  1. define TMPDIR env variable (for example: TMPDIR=/tmp
  2. Run procdump targeting a process (any)

System information (e.g., distro, kernel version, etc.)

All

The code in question is here:

`void InitProcDump() { ... ... auto_free char* prefixTmpFolder = NULL;

prefixTmpFolder = getenv("TMPDIR");

`