pkiutilities/PKCS12/CrBer/Src/crdata.cpp
branchCompilerCompatibility
changeset 8 150a5dd64ae5
parent 5 3b17fc5c9564
--- a/pkiutilities/PKCS12/CrBer/Src/crdata.cpp	Mon Mar 08 21:44:12 2010 +0000
+++ b/pkiutilities/PKCS12/CrBer/Src/crdata.cpp	Sun Mar 14 13:12:09 2010 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2000, 2004, 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -519,7 +519,13 @@
         TDes8 tempDes = tempBuf->Des();
 
         // Read data to a buffer from iPointer to end of file
-        Read(currentPlace, tempDes, neededLengthToFind);
+        TInt readErr = Read(currentPlace, tempDes, neededLengthToFind);
+        if (readErr)
+            {
+            delete tempBuf;
+            tempBuf = NULL;
+            return readErr;
+            }
 
         // Find the next new line character
         newLinePlace = tempDes.Find(newLine);