[anjuta] mk-project: Prevent a crash
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] mk-project: Prevent a crash
- Date: Fri, 19 Apr 2013 20:22:35 +0000 (UTC)
commit 52e41ffb2d6d1b2c99ac30a1278e644b921c3906
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Fri Apr 19 22:20:03 2013 +0200
mk-project: Prevent a crash
plugins/mk-project/mk-project.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/plugins/mk-project/mk-project.c b/plugins/mk-project/mk-project.c
index e2d178b..3c5b889 100644
--- a/plugins/mk-project/mk-project.c
+++ b/plugins/mk-project/mk-project.c
@@ -667,6 +667,8 @@ mkp_project_get_variable_token (MkpProject *project, AnjutaToken *variable)
length = anjuta_token_get_length (variable);
string = anjuta_token_get_string (variable);
+ if ((length == 0) || (string == NULL)) return NULL;
+
if (string[1] == '(')
{
name = g_strndup (string + 2, length - 3);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]