core: Prevent crash if User-Agent is not in UTF-8
authorLukasz Pawlik <lukasz.pawlik@comarch.com>
Thu, 23 Feb 2012 14:58:12 +0000 (15:58 +0100)
committerJens Georg <mail@jensge.org>
Mon, 19 Mar 2012 19:35:49 +0000 (20:35 +0100)
Based on Lukasz's Harmattan patch.

src/rygel/rygel-client-hacks.vala

index 95b2e0e..2f6f72a 100644 (file)
@@ -41,7 +41,8 @@ internal abstract class Rygel.ClientHacks : GLib.Object {
                            throws ClientHacksError {
         try {
             this.agent_regex = new Regex (agent,
-                                          RegexCompileFlags.CASELESS,
+                                          RegexCompileFlags.CASELESS |
+                                          RegexCompileFlags.RAW,
                                           0);
         } catch (RegexError error) {
             // This means subclasses did not provide a proper regular expression