All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Palecek <jpalecek@web.de>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] Return immediately when the ZOO file couldn't be opened, prevent crash later
Date: Mon, 8 Jun 2009 13:33:41 +0200	[thread overview]
Message-ID: <200906081333.42673.jpalecek@web.de> (raw)

Hello,

there was a crash in pan when the zoofile couldn't be opened; this patch fixes it by disallowing the zoo_open function to continue.

Regards
    Jiri Palecek

Signed-off-by: Jiri Palecek <jpalecek@web.de>

---
 pan/zoolib.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pan/zoolib.c b/pan/zoolib.c
index 3e31733..72ddfb0 100644
--- a/pan/zoolib.c
+++ b/pan/zoolib.c
@@ -104,6 +104,7 @@ zoo_open(char *zooname)
 		snprintf(zoo_error, ZELEN, 
 				"Could not open zoo as \"%s\", errno:%d %s", 
 				zooname, errno, strerror(errno));
+		return 0;
 	    }
 	    fclose(new_zoo);
 	    new_zoo = fopen(zooname, "r+");
-- 
1.6.2.4


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2009-06-08 11:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 11:33 Jiri Palecek [this message]
2009-06-09 18:25 ` [LTP] [PATCH] Return immediately when the ZOO file couldn't be opened, prevent crash later Subrata Modak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906081333.42673.jpalecek@web.de \
    --to=jpalecek@web.de \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.