[grilo-plugins] lua-factory: Fix garbage after escaped text in grl.unescape()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: Fix garbage after escaped text in grl.unescape()
- Date: Wed, 7 May 2014 16:19:05 +0000 (UTC)
commit 6c7f503edd742b595fb29aa4ef986eb6306b1828
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 6 15:58:53 2014 +0200
lua-factory: Fix garbage after escaped text in grl.unescape()
grl.unescape('"Look at Me"')
would give back:
"Look at Me"t Me"
instead of:
"Look at Me"
Don't forget to terminate the copied string when we've unescaped.
https://bugzilla.gnome.org/show_bug.cgi?id=729649
src/lua-factory/grl-lua-library.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index da968d1..db56e57 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -143,6 +143,8 @@ unescape_string (const char *orig_from)
}
}
+ *to = '\0';
+
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]