google-code-export / tovid

Automatically exported from code.google.com/p/tovid
1 stars 0 forks source link

makedvd should check for user error (spaces) on volume ID #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Specifically there is a bug on line 417 of makedvd:

    if test $VOLID != $VALID_VOLID; then

If the user specified a label with spaces the above is a syntax error.  To
correct, simply change to:

    if test "$VOLID" != "$VALID_VOLID"; then

In general when writing shell script, one should always quote one's variables.

Original issue reported on code.google.com by brianjmu...@gmail.com on 19 Apr 2009 at 4:06

GoogleCodeExporter commented 9 years ago
The man page clearly states that no spaces are allowed in the volume id:
-label DISC_LABEL
              Uses DISC_LABEL as the volume ID. This appears as the mount name of 
the disc on some computer platforms. Must be <=32 alphanumeric digits without 
spaces.
I am changing the summary of this report, and changing the Label to 
"Enhancement".

Original comment by grepper@gmail.com on 19 Apr 2009 at 10:40

GoogleCodeExporter commented 9 years ago
Hrm.  Fair enough.  In general though, I don't think that alters my view that 
all
shell variables should be quoted.  But that's up to you I guess.

Indeed, if there are no spaces allowed, then yes, I agree, this bug 
could/should be
changed to verifying user input.

BTW: Is there a technical reason that spaces are not allowed?  DVD spec 
violation or
something.

Original comment by brianjmu...@gmail.com on 19 Apr 2009 at 10:48

GoogleCodeExporter commented 9 years ago
I added quoting to the problematic line in the script, fixed in r2803. At least 
this
will avoid a potential syntax error.

Original comment by wapcaplet88 on 10 Jan 2010 at 9:13