From: Olivier Blin Date: Sun, 26 Oct 2008 13:09:10 +0000 (+0100) Subject: fix segfault when piping to bti and user/password are not set X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/commitdiff_plain/28ebf7d4febc28680abe21a624a05fa71dda4e2b fix segfault when piping to bti and user/password are not set --- 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; }