From 28ebf7d4febc28680abe21a624a05fa71dda4e2b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Sun, 26 Oct 2008 14:09:10 +0100 Subject: [PATCH] fix segfault when piping to bti and user/password are not set --- bti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bti.c b/bti.c index ea464f1..941be79 100644 --- a/bti.c +++ b/bti.c @@ -418,7 +418,7 @@ int main(int argc, char *argv[], char *envp[]) } #endif tweet = get_string_from_stdin(); - if (strlen(tweet) == 0) { + if (!tweet || strlen(tweet) == 0) { dbg("no tweet?\n"); return -1; } -- 2.39.5