geany/geany-plugins — pull request #170 by b4n (2014-10-20 15:50:57+00:00)
Title: geanypg: Simplify string building a lot

Use `g_strdup_printf()` instead of manually computing the string size
and then `sprintf()` in it. This makes the code a lot simpler and less
likely to break when changed as there is no more error-prone code
duplication.

Also, fix the size passed to `strncpy()` to make sure the strings are
always properly nul-terminated.