* util.c (printpath, printpathn): Print NULL and don't try any fetch
when ADDR is zero.
Fixes Debian bug #63093.
struct tcb *tcp;
long addr;
{
- if (umovestr(tcp, addr, MAXPATHLEN, path) < 0)
+ if (addr == 0)
+ tprintf("NULL");
+ else if (umovestr(tcp, addr, MAXPATHLEN, path) < 0)
tprintf("%#lx", addr);
else
string_quote(path);
long addr;
int n;
{
- if (umovestr(tcp, addr, n, path) < 0)
+ if (addr == 0)
+ tprintf("NULL");
+ else if (umovestr(tcp, addr, n, path) < 0)
tprintf("%#lx", addr);
else {
path[n] = '\0';