forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit69d4299
committed
This patch removes the initialization of ri in loop in
quote_postgres(...) in ecpglib.c.The code in CVS reads:quote_postgres(char *arg, int lineno){ char *res = (char *) ecpg_alloc(2 * strlen(arg) + 3, lineno); int i, ri = 0; if (!res) return (res); res[ri++] = '\''; for (i = 0, ri=0; arg[i]; i++, ri++) { switch (arg[i]) { case '\'': res[ri++] = '\''; break; case '\\': res[ri++] = '\\'; break; default: ; }The problem here is that ri is reset to 0, thus overwriting the initialquote.Stephen Birch1 parent2515882 commit69d4299
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
241 |
| - | |
| 241 | + | |
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
|
0 commit comments
Comments
(0)