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

Using -i and -C causes segmentation fault #39

Open
ehwilliamson opened this issue Jul 17, 2020 · 2 comments
Open

Using -i and -C causes segmentation fault #39

ehwilliamson opened this issue Jul 17, 2020 · 2 comments

Comments

@ehwilliamson
Copy link

If CREATE is suppressed, field names are never created:

pgdbf/src/pgdbf.c

Lines 476 to 477 in 4e84775

if(optusecreatetable) {
fieldnames = calloc(fieldcount, MAXCOLUMNNAMESIZE);

Those field names are used in the ignore code:

if(strcmp(fieldnames[fieldnum],ignorefields[i].field) == 0)

Using -i with -C (or -u) cause a segfault when strcmp tries to read a nonexistent fieldname.

@rubenchila
Copy link

Have you ever solved this issue?

@ehwilliamson
Copy link
Author

yeah I just forced that if in line 476 to be true by changing it to if(1). That fixes it for me.

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