From f94bf44ec4bbd5511302e8a0d76bde881c9f0211 Mon Sep 17 00:00:00 2001 From: "Alexander V. Lukyanov" Date: Fri, 24 Jun 2016 18:26:28 +0300 Subject: [PATCH] fish: fixed #250 - a segfault in ARRAY_INFO mode. --- src/Fish.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fish.cc b/src/Fish.cc index a634927..0d8a91c 100644 --- a/src/Fish.cc +++ b/src/Fish.cc @@ -394,7 +394,7 @@ void Fish::SendArrayInfoRequests() void Fish::SendMethod() { - const char *e=alloca_strdup(shell_encode(file)); + const char *e=file?alloca_strdup(shell_encode(file)):0; const char *e1=shell_encode(file1); switch((open_mode)mode) {