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

replace sprintf with snprintf #215

Closed omar-polo closed 1 year ago

omar-polo commented 1 year ago

Hello,

straightforwardly, this replaces some sprintf with a bounded snprintf. It was brought to my attention by the linker on OpenBSD:

pspg.c(pspg.o:(main)): warning: sprintf() is often misused, please use snprintf()
okbob commented 1 year ago

thank you for PR

omar-polo commented 1 year ago

Thanks! :)

in the same vein I'd like to follow up with a diff to replace strcpy with strlcpy soon (tm)