Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault while casting empty string to jsquery. #35

Closed
d0d63r opened this issue Apr 1, 2019 · 1 comment
Closed

Segmentation fault while casting empty string to jsquery. #35

d0d63r opened this issue Apr 1, 2019 · 1 comment

Comments

@d0d63r
Copy link

d0d63r commented Apr 1, 2019

Here is steps for issue reproducing.
Every "execute" performs successfully until 6th try.
Reproduced at PostgreSQL version 10.5, jsquery version 1.1.0.

create extension jsquery;

prepare a as (select $1::text::jsquery);

execute a('');
execute a('');
execute a('');
execute a('');
execute a('');
execute a('');
@sokolcati
Copy link
Contributor

Thank you for reporting this fault!
Fixed by commit 8011ac5.
Now entering an empty string is prohibited at the query parsing stage:

select ''::jsquery;
ERROR:  bad jsquery representation
LINE 1: select ''::jsquery;
               ^
DETAIL:  No symbols read at the end of input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants