pgdbf icon indicating copy to clipboard operation
pgdbf copied to clipboard

Using -i and -C causes segmentation fault

Open ehwilliamson opened this issue 5 years ago • 2 comments

If CREATE is suppressed, field names are never created: https://github.com/kstrauser/pgdbf/blob/4e847759b5eee96da9dc3d2604e0b555ddd57ccb/src/pgdbf.c#L476-L477

Those field names are used in the ignore code: https://github.com/kstrauser/pgdbf/blob/4e847759b5eee96da9dc3d2604e0b555ddd57ccb/src/pgdbf.c#L538

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

ehwilliamson avatar Jul 17 '20 20:07 ehwilliamson

Have you ever solved this issue?

rubenchila avatar Jul 20 '23 19:07 rubenchila

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

ehwilliamson avatar Jul 20 '23 20:07 ehwilliamson