diff options
author | Tim-Philipp Müller <tpm@src.gnome.org> | 2006-10-25 15:22:05 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tpm@src.gnome.org> | 2006-10-25 15:22:05 +0000 |
commit | 504f82e8defc0fede62548b9d97b83b0f968ccac (patch) | |
tree | e804db6ee7988d0191bc4cc71ac661aaddd10bab /src | |
parent | 61d0407442857ced863eb7e82e968ae8b4c17ec3 (diff) | |
download | totem-504f82e8defc0fede62548b9d97b83b0f968ccac.tar.gz |
Make extra sure we only return valid UTF-8 strings as metadata, since
* src/backend/bacon-video-widget-gst-0.10.c:
(bacon_video_widget_get_metadata_string):
Make extra sure we only return valid UTF-8 strings as metadata,
since g_markup_escape_text() tends to just crash if the input is
not valid UTF-8 (see #360552).
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/bacon-video-widget-gst-0.10.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c index 6085a47c1..f72938b8a 100644 --- a/src/backend/bacon-video-widget-gst-0.10.c +++ b/src/backend/bacon-video-widget-gst-0.10.c @@ -3668,11 +3668,12 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget * bvw, g_assert_not_reached (); } - if (res) { + if (res && string && g_utf8_validate (string, -1, NULL)) { g_value_take_string (value, string); GST_DEBUG ("%s = '%s'", get_metadata_type_name (type), string); } else { g_value_set_string (value, NULL); + g_free (string); } return; |