History

Merge pull request #1511 from mstorsjo/check-fread-return-value

Check the return value of fread

ruil2 committed 12 years ago

Commit 843955b2 parents a7b2279 80bfc431 file · +1 −1Browse files

Showing the changes to test/decoder/DecUT_DecExt.cpp (1 of 1 file). Show all

Unified · Split

test/decoder/DecUT_DecExt.cpp+1−1
@@ -130,7 +130,7 @@ void DecoderInterfaceTest::DecoderBs (const char* sFileName) { · 129 unmodified lines
130130 iFileSize = (int32_t) ftell (pH264File);
131131 fseek (pH264File, 0L, SEEK_SET);
132132 pBuf = new uint8_t[iFileSize + 4];
133− fread (pBuf, 1, iFileSize, pH264File);
133+ ASSERT_EQ(fread (pBuf, 1, iFileSize, pH264File), (unsigned int) iFileSize);
134134 memcpy (pBuf + iFileSize, &uiStartCode[0], 4); //confirmed_safe_unsafe_usage
135135 while (true) {
136136 if (iBufPos >= iFileSize) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t