dvdauthor segfaults on non-existing xml file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dvdauthor (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
dvdauthor segfaults if the file given with the "-x" option does not exist. This particular bug has been reported on the dvdauthor mailing list over a year ago [1], but the maintainer has been unresponsive [2]. The bug is rooted in not checking the return value from varied_open() after opening a file in readxml.c
Note that there are currently (at least) two forks of the dvdauthor project [2].
Version: dvdauthor-0.6.14 (dvdauthor_
Platforms: Tested and confirmed on both 9.04 and 9.10.
How to reproduce (there is no file 'foo' on local file system):
$ ./src/dvdauthor -x foo
DVDAuthor:
Build options: gnugetopt iconv
Send bugs to <email address hidden>
Segmentation fault (core dumped)
Fix:
$ git diff src/readxml.c
diff --git a/src/readxml.c b/src/readxml.c
index e96f869..fe2395a 100644
--- a/src/readxml.c
+++ b/src/readxml.c
@@ -57,6 +57,10 @@ int readxml(const char *xmlfile,struct elemdesc *elems,struct elemattr *attrs)
struct vfile fd;
fd=
+ if( !fd.h ) {
+ fprintf(
+ exit(1);
+ }
f=
if(!f) {
Behaviour after fix:
$ ./src/dvdauthor -x foo
DVDAuthor:
Build options: gnugetopt iconv
Send bugs to <email address hidden>
ERR: No such file 'foo'
See also:
[1] http://
[2] https:/
Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Maverick Meerkat.
If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at https:/ /help.ubuntu. com/community/ UbuntuBackports #request- new-packages