Commit 4a8998e0 authored by hpi1's avatar hpi1

libbluray_test: check fwrite() return value

parent b622ec9e
......@@ -72,7 +72,8 @@ int main(int argc, char *argv[])
while (1) {
int len = bd_read(bd, buf, 6144);
if (len <= 0) break;
fwrite(buf, len, 1, fd);
if (fwrite(buf, len, 1, fd) < 1)
break;
if (!(ii % 1000)) {
DEBUG(DBG_BLURAY,
"%d\r", ii);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment