okbob / pspg

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
BSD 2-Clause "Simplified" License
2.43k stars 85 forks source link

Segfault on empty input #213

Closed ethack closed 1 year ago

ethack commented 1 year ago

I'm getting a segfault when using --highlight-odd-rec in combination with --csv and empty input. Neither flags by themselves segfault. It's only the combination of the two with empty input.

$ pspg --version
pspg-5.5.12

$ echo | pspg --csv --highlight-odd-rec
pspg crashed by signal 11
zsh: done                              echo | 
zsh: segmentation fault (core dumped)  pspg --csv --highlight-odd-rec

None of these segfault:

$ echo | pspg --csv  

$ echo | pspg --highlight-odd-rec

$ echo 1 | pspg --csv --highlight-odd-rec
okbob commented 1 year ago

should be fixed in 5.5.13

ethack commented 1 year ago

Confirmed on my side. Thanks a lot!

okbob commented 1 year ago

po 28. 11. 2022 v 18:40 odesílatel ethack @.***> napsal:

Confirmed on my side. Thanks a lot!

Thank you for bug report :)

— Reply to this email directly, view it on GitHub https://github.com/okbob/pspg/issues/213#issuecomment-1329488738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO4ZN7XVXMLDOV7XCV7TWKTVA3ANCNFSM6AAAAAASIL3RZQ . You are receiving this because you modified the open/close state.Message ID: @.***>