ref: 843955bc060b017d4e6a48cb4f7bb8c98cb807e9
parent: a7b22795bfd069cb49856f1082ebeb0dac216cab
parent: 80bfc43df55dd8812da3eedf6d1ee96235891733
author: ruil2 <ruil2@cisco.com>
date: Sun Nov 9 04:35:26 EST 2014
Merge pull request #1511 from mstorsjo/check-fread-return-value Check the return value of fread
--- a/test/decoder/DecUT_DecExt.cpp
+++ b/test/decoder/DecUT_DecExt.cpp
@@ -130,7 +130,7 @@
iFileSize = (int32_t) ftell (pH264File);
fseek (pH264File, 0L, SEEK_SET);
pBuf = new uint8_t[iFileSize + 4];
- fread (pBuf, 1, iFileSize, pH264File);
+ ASSERT_EQ(fread (pBuf, 1, iFileSize, pH264File), (unsigned int) iFileSize);
memcpy (pBuf + iFileSize, &uiStartCode[0], 4); //confirmed_safe_unsafe_usage
while (true) {
if (iBufPos >= iFileSize) {