[gmime] Properly handle parser errors in basic-example.c
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Properly handle parser errors in basic-example.c
- Date: Tue, 27 Sep 2016 13:47:25 +0000 (UTC)
commit 9c610b076c510791bcbdeeb6547107957717473f
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Tue Sep 27 09:45:53 2016 -0400
Properly handle parser errors in basic-example.c
Patch by Hanno Boeck
Fixes bug #772045
examples/basic-example.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/examples/basic-example.c b/examples/basic-example.c
index 777a3bf..0fc1a70 100644
--- a/examples/basic-example.c
+++ b/examples/basic-example.c
@@ -316,6 +316,10 @@ int main (int argc, char **argv)
/* parse the message */
message = parse_message (fd);
+ if (message == NULL) {
+ printf("Error parsing message");
+ return 1;
+ }
/* count the number of parts in the message */
count_parts_in_message (message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]