Commit 3c237e73 authored by Marc G. Fournier's avatar Marc G. Fournier

I have two small patches which correct some very obscure bug in the parser

of the array constants and in one of the loadable modules I posted some time
ago.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
parent 8594ade7
...@@ -79,7 +79,7 @@ string_output(char *data, int size) ...@@ -79,7 +79,7 @@ string_output(char *data, int size)
len++; len++;
break; break;
default: default:
if (NOTPRINTABLE(c)) { if (NOTPRINTABLE(*p)) {
len += 3; len += 3;
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.4 1996/08/27 07:32:27 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.5 1996/09/19 20:04:56 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -235,6 +235,10 @@ _ArrayCount(char *str, int dim[], int typdelim) ...@@ -235,6 +235,10 @@ _ArrayCount(char *str, int dim[], int typdelim)
} }
break; break;
#endif #endif
case '\0':
/* Signal a premature end of the string. DZ - 2-9-1996 */
elog(WARN, "malformed array constant: %s", str);
break;
case '\"': case '\"':
scanning_string = ! scanning_string; scanning_string = ! scanning_string;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment