Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6b19803

Browse files
committed
Make a pstrdup copy of the literalbuf when scanning a bit string. Other-
wise the next bit string in the same command clobbers the previous ones.
1 parent a933ee3 commit 6b19803

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/parser/scan.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.82 2000/11/02 23:20:27 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.83 2000/11/16 22:47:44 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -289,7 +289,7 @@ other .
289289
if (literalbuf[strspn(literalbuf + 1, "01") + 1] != '\0')
290290
elog(ERROR, "invalid bit string input: '%s'",
291291
literalbuf);
292-
yylval.str = literalbuf;
292+
yylval.str = pstrdup(literalbuf);
293293
return BITCONST;
294294
}
295295
<xh>{xhinside} |

0 commit comments

Comments
 (0)