]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix crash when dvd volume id has non-ascii characters
authorjstebbins <jstebbins.hb@gmail.com>
Fri, 8 Jun 2012 20:38:40 +0000 (20:38 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Fri, 8 Jun 2012 20:38:40 +0000 (20:38 +0000)
The iso9660 spec says the volume id must only be composed of 0-9, A-Z, and _.
But dvd authors seem to take liberties with the character set.  Certain
non-ascii character sequences cause a crash in the glib function
g_markup_escape_text(). So force all characters into the standard ascii range.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4724 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/hb-backend.c

index 2594d3d9ac3315d046d5a8db5cc2508e872174e3..46898b9c89b76dfaa471700b0a49d411abf43814 100644 (file)
@@ -5509,7 +5509,7 @@ sanitize_volname(gchar *name)
                        b++;
                        break;
                default:
-                       *a = *b;
+                       *a = *b & 0x7f;
                        a++; b++;
                        break;
                }