[rygel] core: Prevent crash if User-Agent is not in UTF-8



commit ece0c5648bf9b101ecbd393eb05f1ca12ce29b55
Author: Lukasz Pawlik <lukasz pawlik comarch com>
Date:   Thu Feb 23 15:58:12 2012 +0100

    core: Prevent crash if User-Agent is not in UTF-8
    
    Based on Lukasz's Harmattan patch.

 src/rygel/rygel-client-hacks.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-client-hacks.vala b/src/rygel/rygel-client-hacks.vala
index 95b2e0e..2f6f72a 100644
--- a/src/rygel/rygel-client-hacks.vala
+++ b/src/rygel/rygel-client-hacks.vala
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]