Subject: | quote_bytea in quote.c doesn't properly handle strings |
The strncpy (line 310) in quote.c only copies the string contents not the termination character (\0). Then strncpy destroys the end of the dest string which causes the assertion error to be raised on line 319.
The patch below fixes this problem.
-bryan
--- quote.c 2005-10-03 14:46:37.895979381 -0400
+++ quote_orig.c 2005-05-24 15:14:24.000000000 -0400
@@ -307,7 +307,7 @@
dest = result;
Copy("'", dest++, 1, char);
- strncpy(dest,intermead,strlen(intermead)+1);
+ strncpy(dest,intermead,strlen(intermead));
strcat(dest,"\'");