]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - misc-utils/cal.c
lib/mbalign: fix unsigned integer overflow [AddressSanitizer]
[thirdparty/util-linux.git] / misc-utils / cal.c
index e763fe140a53afdffb94e0351165e79a698a9a14..a11136a5ba2f1b2944b59657f718d793f85f9c0d 100644 (file)
@@ -137,7 +137,6 @@ static void my_putstring(char *s)
 
 #if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP)
 static const char      *term="";
-static int             Slen;           /* strlen of Senter+Sexit */
 #endif
 
 static const char      *Senter="", *Sexit="";/* enter and exit standout mode */
@@ -188,12 +187,7 @@ enum {
 
 #define TODAY_FLAG             0x400           /* flag day for highlighting */
 
-#define FMT_ST_LINES 9
 #define FMT_ST_CHARS 300       /* 90 suffices in most locales */
-struct fmt_st
-{
-       char s[FMT_ST_LINES][FMT_ST_CHARS];
-};
 
 static const int days_in_month[2][13] = {
        {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
@@ -304,7 +298,6 @@ int main(int argc, char **argv)
                if (ret > 0) {
                        Senter = my_tgetstr("so","smso");
                        Sexit = my_tgetstr("se","rmso");
-                       Slen = strlen(Senter) + strlen(Sexit);
                }
        }
 #endif