Bugzilla – Bug 157631
playdv aborts with bus error on empty file
Last modified: 2006-03-22 12:01:57 UTC
looks like we miss a trivial sanity check. Reproduce with $ :> test.dv $ playdv test.dv bus error see the coredump at $ showmount -e d110 Export list for d110: /home/testy/dv * $ Other files (captured with a Sony VX2000) work nicely.
I submitted this patch for STABLE: libdv-filesizecheck.patch The patch checks if the file is smaller than the smallest video frame size, and if it's smaller, there can't be a valid video file in it, hence, the file is truncated: if (!dv_player->no_mmap) { if(fstat(fd, &dv_player->statbuf)) goto fstatfail; eof = dv_player->statbuf.st_size; + if (eof < sizeof(dv_header_t) + 120000) { /* 1st frame incomplete */ + fprintf(stderr, "playdv: File size of %d bytes " + "smaller than frame size, nothing to play!\n", eof); + exit(-1); + } } Changelog entry: - Fix playdv abort with Bus Error on empty file (#157631) Will set to fixed when I know the code release in which it will appear.
The fix is in stabled (already built), so it will be in the next beta/RC