Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jul 2015 13:19:42 GMT
From:      def@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r288531 - soc2013/def/crashdump-head/sbin/cryptcore
Message-ID:  <201507181319.t6IDJgYk037711@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: def
Date: Sat Jul 18 13:19:42 2015
New Revision: 288531
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=288531

Log:
  Report an error when it was unable to read data from input file.

Modified:
  soc2013/def/crashdump-head/sbin/cryptcore/cryptcore.c

Modified: soc2013/def/crashdump-head/sbin/cryptcore/cryptcore.c
==============================================================================
--- soc2013/def/crashdump-head/sbin/cryptcore/cryptcore.c	Sat Jul 18 13:13:39 2015	(r288530)
+++ soc2013/def/crashdump-head/sbin/cryptcore/cryptcore.c	Sat Jul 18 13:19:42 2015	(r288531)
@@ -195,6 +195,10 @@
 		}
 		bufused = 0;
 	}
+	if (bytes < 0) {
+		pjdlog_errno(LOG_ERR, "Unable to read data from %s", input);
+		goto failed;
+	}
 
 	bzero(key, sizeof(key));
 	bzero(buf, sizeof(buf));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507181319.t6IDJgYk037711>