summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorMichael Scherer <misc@mandriva.org>2010-03-07 19:29:39 -0500
committerSadrul Habib Chowdhury <sadrul@users.sourceforge.net>2010-03-07 19:29:39 -0500
commit261a022ce947d17471b73a71345c265df9bfe7a4 (patch)
treea527b05c46c7f5b91ef7413f75627d71f7fd5f80 /src/termcap.c
parent2e62d3683eefb23e6955b55c16ce3266b12aa401 (diff)
downloadscreen-261a022ce947d17471b73a71345c265df9bfe7a4.tar.gz
Fix build with -Werror=format-security
Some distributions ( mandriva for example ) use -Werror=format-security by default when build C software to try to enhance code quality and prevent security bugs. As the policy is to correct all occurences of the error ( so there is no false positive, nor question about to fix it or not ), a patch that fix the error on gnu screen 4.0.3 have been added to the package. I have rediffed it against latest git snapshot, to be sent upstream. It mainly add "%s" where applicable.
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/termcap.c b/src/termcap.c
index 8f6b8b9..32ae63d 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -137,7 +137,7 @@ int he;
if ((D_tentry = (char *)malloc(TERMCAP_BUFSIZE + (extra_incap ? strlen(extra_incap) + 1 : 0))) == 0)
{
- Msg(0, strnomem);
+ Msg(0, "%s", strnomem);
return -1;
}
@@ -1198,7 +1198,7 @@ char *s;
if ((D_xtable = (char ***)calloc(256, sizeof(char **))) == 0)
{
- Msg(0, strnomem);
+ Msg(0, "%s", strnomem);
return -1;
}
@@ -1216,7 +1216,7 @@ char *s;
{
if ((D_xtable[curchar] = (char **)calloc(257, sizeof(char *))) == 0)
{
- Msg(0, strnomem);
+ Msg(0, "%s", strnomem);
FreeTransTable();
return -1;
}
@@ -1250,7 +1250,7 @@ char *s;
l = l * templnsub + templlen;
if ((ctable[c] = (char *)malloc(l + 1)) == 0)
{
- Msg(0, strnomem);
+ Msg(0, "%s", strnomem);
FreeTransTable();
return -1;
}