GNOME Bugzilla – Bug 737633
Fail to build because of insecure format string
Last modified: 2014-09-30 07:41:05 UTC
I got this error when building easytag: src/tags/id3_tag.c:229:22: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] We should replace g_set_error with g_set_error_literal.
Created attachment 287411 [details] [review] Fix format string problem by using g_set_error_literal
Review of attachment 287411 [details] [review]: Thanks for the patch! I guess that the warning is from Clang, as gcc 4.9.1 does not emit a warning. Anyway, I modified the patch to use a format string of "%s", as that is done throughout the rest of EasyTAG, so it matches a bit better with the surrouding coding style. Pushed to master as a58b943a71fba1168393182143b70cb9de830ed2.
(In reply to comment #2) > Review of attachment 287411 [details] [review]: > > Thanks for the patch! I guess that the warning is from Clang, as gcc 4.9.1 does > not emit a warning. Anyway, I modified the patch to use a format string of > "%s", as that is done throughout the rest of EasyTAG, so it matches a bit > better with the surrouding coding style. Pushed to master as > a58b943a71fba1168393182143b70cb9de830ed2. Yes, this warning is from clang 3.4.1.