# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1262864623 -7200 # Node ID 29dae20d06bfcfcd611d3579975e69c0eaf0475b # Parent e35f4098820571faf49cd095759b96ee1adb1667 Revision: 200951 Kit: 201001 diff -r e35f40988205 -r 29dae20d06bf 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) {