jbboehr / handlebars.c

C implementation of handlebars.js
GNU Lesser General Public License v2.1
35 stars 5 forks source link

Build failure with [-Werror=format-security] #87

Closed remicollet closed 4 years ago

remicollet commented 4 years ago

During make test, lot of build failure

ex: ck_abort_msg first arg must be a "format" (a string literal)

ex: ck_abort_msg(msg) => ck_abort_msg("%s", msg)

remicollet commented 4 years ago

Here is the patch I used for version 0.7.2 https://git.remirepo.net/cgit/rpms/lib/libhandlebars.git/plain/build.patch

Sadly the git master branch have diverged a lot, and cannot be applied properly... I need to set up a better build env to work on this

jbboehr commented 4 years ago

Looks like this is specifically introduced in libcheck 0.15.2 (or maybe 0.15.1, although it looks like it was targeted for 0.15.0, I couldn't replicate it on that version). I'm still on 0.14 and nixpkgs-unstable is still on 0.15.0.

jbboehr commented 4 years ago

Thanks for the tip and patch, btw! I'm specifying -Wformat-security in my build flags but libcheck only added the printf attribute recently so I didn't catch them.

I need to set up a better build env to work on this

I hope I'm not causing you too much extra work!

remicollet commented 4 years ago

thanks for the quick fix.

I hope I'm not causing you too much extra work!

No, as I don't start to work on it ;)