diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-15 16:54:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-15 16:54:40 +0000 |
commit | 3e9c234823bd435f8a273dc7287a181f42a5d3ba (patch) | |
tree | d8a1e8357b1449d12eca4035c302162a5535e939 /src/monkey | |
parent | c52dd845a175f3797d7be211998f71b3ea56cfd0 (diff) | |
download | gnunet-3e9c234823bd435f8a273dc7287a181f42a5d3ba.tar.gz gnunet-3e9c234823bd435f8a273dc7287a181f42a5d3ba.zip |
proper escape
Diffstat (limited to 'src/monkey')
-rw-r--r-- | src/monkey/edb_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/monkey/edb_api.c b/src/monkey/edb_api.c index df88dc326..65b16a4a6 100644 --- a/src/monkey/edb_api.c +++ b/src/monkey/edb_api.c | |||
@@ -101,8 +101,8 @@ GNUNET_MONKEY_EDB_get_expression_scope_end(struct GNUNET_MONKEY_EDB_Context *cnt | |||
101 | char *errMsg; | 101 | char *errMsg; |
102 | char *query; | 102 | char *query; |
103 | 103 | ||
104 | if (asprintf(&query, "select end_lineno from Expression where file_name LIKE \'\%/%s\' and start_lineno = %d", file_name, start_line_no) == -1) { | 104 | if (asprintf(&query, "select end_lineno from Expression where file_name LIKE \'%%/%s\' and start_lineno = %d", file_name, start_line_no) == -1) { |
105 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Memory allocation problem occurred during creating database query!\n"); | 105 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Memory allocation problem occurred during creating database query!\n"); |
106 | return GNUNET_NO; | 106 | return GNUNET_NO; |
107 | } | 107 | } |
108 | 108 | ||
@@ -141,7 +141,7 @@ GNUNET_MONKEY_EDB_get_expressions (struct GNUNET_MONKEY_EDB_Context *cntxt, | |||
141 | char *query; | 141 | char *query; |
142 | if (asprintf | 142 | if (asprintf |
143 | (&query, | 143 | (&query, |
144 | "select expr_syntax, start_lineno from Expression where file_name LIKE \'\%/%s\' and start_lineno <= %d and end_lineno = %d", | 144 | "select expr_syntax, start_lineno from Expression where file_name LIKE \'%%/%s\' and start_lineno <= %d and end_lineno = %d", |
145 | file_name, start_line_no, end_line_no) == -1) | 145 | file_name, start_line_no, end_line_no) == -1) |
146 | { | 146 | { |
147 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 147 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |