summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40ae887)
raw | patch | inline | side by side (parent: 40ae887)
author | Gerrit Pape <pape@smarden.org> | |
Wed, 26 Mar 2008 18:05:17 +0000 (18:05 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 26 Mar 2008 23:15:02 +0000 (16:15 -0700) |
If no imap host is specified in the git config, git imap-send used
to try to lookup a null pointer through gethostbyname(), causing a
segfault. Since setting the imap.host variable is mandatory,
imap-send now properly fails with an explanatory error message.
The problem has been reported by picca through
http://bugs.debian.org/472632
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to try to lookup a null pointer through gethostbyname(), causing a
segfault. Since setting the imap.host variable is mandatory,
imap-send now properly fails with an explanatory error message.
The problem has been reported by picca through
http://bugs.debian.org/472632
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c | patch | blob | history |
diff --git a/imap-send.c b/imap-send.c
index 10cce15a427646a1281afa5197f40def39151154..04afbc492485d95a85a7f0f57bbb48def6337a99 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
fprintf( stderr, "no imap store specified\n" );
return 1;
}
+ if (!server.host) {
+ fprintf( stderr, "no imap host specified\n" );
+ return 1;
+ }
/* read the messages */
if (!read_message( stdin, &all_msgs )) {