Revision: 200951
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 07 Jan 2010 13:43:43 +0200
changeset 1 29dae20d06bf
parent 0 e35f40988205
child 2 4409849f4082
Revision: 200951 Kit: 201001
xmlsecurityengine/xmlseccrypto/src/xmlsecc_bio.cpp
--- a/xmlsecurityengine/xmlseccrypto/src/xmlsecc_bio.cpp	Thu Dec 17 09:29:21 2009 +0200
+++ b/xmlsecurityengine/xmlseccrypto/src/xmlsecc_bio.cpp	Thu Jan 07 13:43:43 2010 +0200
@@ -88,7 +88,12 @@
 	    }
 	fseek(fp, 0, SEEK_END);
 	fileLen = ftell(fp);
-    fseek ( fp , 0L , SEEK_SET );
+	if(fileLen < 0)
+		{
+			xmlSecSetErrorFlag( KErrGeneral );
+			return(NULL);
+		}
+	fseek ( fp , 0L , SEEK_SET );
 	
 	buf = (char *)malloc(sizeof(char)*(fileLen+1));
     if(!buf) {