From d30dbda89737dd855d27611a8d6afecec03a4db4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 15 Dec 2012 19:42:54 +0200 Subject: [PATCH] Virus: Fix dot command segfault --- virus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virus.c b/virus.c index f96c5d4..1613d4d 100644 --- a/virus.c +++ b/virus.c @@ -2647,7 +2647,7 @@ static Byte *char_insert(Byte * p, Byte c) // insert the char c at 'p' p = text_hole_delete (p, p); // shrink buffer 1 char #ifdef BB_FEATURE_VI_DOT_CMD // also rmove char from last_modifying_cmd - if (strlen((char *) last_modifying_cmd) > 0) { + if (last_modifying_cmd && (strlen((char *) last_modifying_cmd) > 0)) { Byte *q; q = last_modifying_cmd; -- 2.47.3