Changeset 560


Ignore:
Timestamp:
Oct 31, 2020, 11:44:21 PM (4 years ago)
Author:
katerina
Message:

Fix for ticket #449 (gcc 10 compile issues).

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r556 r560  
    14941494        -rm -rf $(distdir)
    14951495        -rm -f $(distdir).tar.gz.asc
    1496         @gpg -a --detach-sign $(distdir).tar.gz; \
    1497         $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
    1498         rm -f $(distdir).tar.gz; \
    1499         rm -f $(distdir).tar.gz.asc; \
    1500         gzip --best $(distdir).tar
    1501         mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
    1502         @echo "========================"; \
    1503         echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
    1504         echo "========================"
     1496        gpg -a --detach-sign $(distdir).tar.gz;
     1497        $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc;
     1498        @if test x"$$?" != x0; then \
     1499                rm -f $(distdir).tar.gz; \
     1500                echo "ERROR creating $(PACKAGE)_signed-$(VERSION).tar.gz"; \
     1501        else \
     1502                rm -f $(distdir).tar.gz; \
     1503                rm -f $(distdir).tar.gz.asc; \
     1504                gzip --best $(distdir).tar; \
     1505                mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz; \
     1506                echo "========================"; \
     1507                echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
     1508                echo "========================"; \
     1509        fi; \
    15051510
    15061511#
  • trunk/configure.ac

    r557 r560  
    1212dnl start
    1313dnl
    14 AM_INIT_AUTOMAKE(samhain, 4.4.2)
     14AM_INIT_AUTOMAKE(samhain, 4.4.3)
    1515AC_DEFINE([SAMHAIN], 1, [Application is samhain])
    1616AC_CANONICAL_HOST
  • trunk/docs/Changelog

    r556 r560  
     14.4.3:
     2        * allow console logging to a unix domain socket
     3        * fix spurious cppcheck warnings
     4        * fix gcc 10 compiler warning in sh_audit.c
     5        * fix gcc 10 compiler warning in sh_ipvx.c
     6        * fix gcc 10 compile problem in sh_tiger1_64.c
     7        * fix gcc 10 compiler warning in sh_portcheck.c
     8
    194.4.2:
    210        * re-enabled reading options from option group [samhain] in my.cnf
    3         * fix server install in configure.ac: samhainadmin.pl <-> yuleadmin.pl
     11        * fix server install in configure.ac: samhainadmin.pl <-> ..-gpg.pl, ..-sig.pl
    412        * add more verbosity to portable binary installer, fix minor issues
    513
  • trunk/src/sh_audit.c

    r541 r560  
    7575
    7676  if (auparse_find_field(au, _("success")))
    77     strncpy(state->success, auparse_interpret_field(au), REC_SIZE_SUCCESS);
     77    sl_strlcpy(state->success, auparse_interpret_field(au), REC_SIZE_SUCCESS);
    7878
    7979  if (auparse_find_field(au, "uid"))
  • trunk/src/sh_dbIO.c

    r550 r560  
    227227    {
    228228      /* alignment problem */
    229       unsigned char swap;
    230       static unsigned short ooop;
    231       unsigned char * ii;
    232       ooop = *iptr;
    233       ii = (unsigned char *) &ooop;
    234       swap = ii[0]; ii[0] = ii[1]; ii[1] = swap;
     229      static unsigned short ooop = *iptr;
     230      unsigned short hi   = (ooop & 0xff00);
     231      unsigned short lo   = (ooop & 0xff);
     232      ooop = (lo << 8) | (hi >> 8);
    235233      return &ooop;
    236234    }
  • trunk/src/sh_filter.c

    r541 r560  
    115115  }
    116116
     117  /* cppcheck-suppress uninitvar */
    117118  i = *ntok;
    118119  if (i == SH_FILT_NUM) {
  • trunk/src/sh_ipvx.c

    r541 r560  
    201201  static char ipbuf[SH_IP_BUF];
    202202
     203  memset(&ss, 0, sizeof(struct sh_sockaddr));
    203204  sh_ipvx_save(&ss, sa_family, sa);
    204205  sh_ipvx_ntoa (ipbuf, sizeof(ipbuf), &ss);
  • trunk/src/sh_portcheck.c

    r541 r560  
    601601  struct sh_portentry * ptr = *head;
    602602  struct sh_portentry * pre = *head;
    603   char errbuf[256];
     603  char errbuf[512];
    604604
    605605  /* Take the address to keep gcc from putting them into registers.
     
    731731{
    732732  struct sh_portentry * portent;
    733   char errbuf[256];
     733  char errbuf[512];
    734734
    735735 
  • trunk/src/sh_srp.c

    r544 r560  
    119119            get_str_internal = ptr;
    120120          else
    121             { free(get_str_internal); get_str_internal = NULL; }
     121            {
     122              /* "If realloc() fails, the original block is left untouched;
     123               * it is not freed or moved." */
     124              /* cppcheck-suppress doubleFree */
     125              free(get_str_internal);
     126              get_str_internal = NULL;
     127            }
    122128        }
    123129      if (get_str_internal == NULL)
  • trunk/src/sh_tiger1_64.c

    r481 r560  
    140140#define roundend(a,b,c,x) \
    141141 : "+r" (a), "+r" (b), "+r" (c) \
    142  : "r" (a), "r" (b), "r" (c), "m" (x), "r" (&tiger_table),\
     142 : "g" (a), "g" (b), "g" (c), "m" (x), "r" (&tiger_table),\
    143143  "i" (MASK0), "i" (MASK8), "i" (MASK16), "r" (MASK32), "r" (MASK40), "r" (MASK48) \
    144144 : "3", "%rax","%rbx","%rcx","%rdx","%rsi", "%edi", "%r8"  );
  • trunk/src/sh_utils.c

    r541 r560  
    827827    copy_four ( (unsigned char *) &(cc[i]), h1[i]);
    828828
     829  /* cppcheck-suppress uninitvar */
    829830  h2 = sh_tiger_hash_uint32 ( inner, TIGER_DATA,
    830831                              (unsigned long) KEY_BLOCK+textlen,
     
    833834    copy_four ( (unsigned char *) &(cc[i]), h2[i - (KEY_LEN/8)]);
    834835
     836  /* cppcheck-suppress uninitvar */
    835837  SH_FREE(inner);
    836838 
     
    22012203    SL_RETURN(NULL, _("sh_util_strconcat"));
    22022204
     2205  /* cppcheck-suppress uninitvar */
    22032206  strnew[0] = '\0';
    22042207
  • trunk/test/testcompile.sh

    r539 r560  
    175175                    sed --in-place 's/-Wno-empty-body/-Wno-empty-body -Wno-invalid-source-encoding/g' Makefile
    176176                    sed --in-place 's/-fno-strength-reduce//g' Makefile
     177                    sed --in-place 's/-fstack-clash-protection//g' Makefile
    177178                    $MAKE -e CC=$CLANG_CC -e BUILD_CC=$CLANG_CC cutest > /dev/null 2>> test_log
    178179                fi
Note: See TracChangeset for help on using the changeset viewer.