From 495adee26949378735f2ec18beac49ad2120caa2 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 12 Jul 2014 11:01:00 -0700 Subject: [PATCH] Don't sanity_lose if INTERNAL_BLOCK_NODEs have a null argv Fixes #1545 --- proc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/proc.cpp b/proc.cpp index f62b00f64..a0c7efa63 100644 --- a/proc.cpp +++ b/proc.cpp @@ -1298,9 +1298,11 @@ void proc_sanity_check() p = j->first_process; while (p) { - validate_pointer(p->get_argv(), _(L"Process argument list"), 0); - validate_pointer(p->argv0(), _(L"Process name"), 0); - validate_pointer(p->next, _(L"Process list pointer"), 1); + /* Internal block nodes do not have argv - see #1545 */ + bool null_ok = (p->type == INTERNAL_BLOCK_NODE); + validate_pointer(p->get_argv(), _(L"Process argument list"), null_ok); + validate_pointer(p->argv0(), _(L"Process name"), null_ok); + validate_pointer(p->next, _(L"Process list pointer"), true); if ((p->stopped & (~0x00000001)) != 0) {