[gvfs] common: Make autorun.inf parsing less strict
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] common: Make autorun.inf parsing less strict
- Date: Fri, 1 Nov 2013 10:05:55 +0000 (UTC)
commit 0f5d4be5ceb7fa4df7882b784f8c8e41303b8d8c
Author: timeless <timeless gmail com>
Date: Fri Nov 1 12:01:34 2013 +0200
common: Make autorun.inf parsing less strict
Make the parsing of autorun.inf less strict by ignoring whitespace
around "=".
Tweaked by Ross Lagerwall to prevent a match occurring if the part after
the "=" contains only whitespace.
https://bugzilla.gnome.org/show_bug.cgi?id=595027
common/gvfsmountinfo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index 60a3527..054af57 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -107,7 +107,7 @@ on_autorun_loaded (GObject *source_object,
/* [^,] is because sometimes the icon= line
* has a comma at the end
**/
- icon_regex = g_regex_new ("icon=([^,\\r\\n]+)",
+ icon_regex = g_regex_new ("icon\\s*=\\s*+([^,\\r\\n]+)",
G_REGEX_CASELESS, 0, NULL);
g_regex_match (icon_regex, content, 0,
&match_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]