Project

General

Profile

Actions

Bug #10758

closed

c2audit: NULL pointer errors

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

NULL pointer errors:

    ../../common/c2/audit.c: In function 'audit_ipcget':
    ../../common/c2/audit.c:931:2: error: pointers are not permitted as case values
      case NULL:
      ^~~~
    In file included from ../../common/c2/audit.c:52:0:
    ../../common/c2/audit.c: In function 'audit_enterprom':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'audit_async_finish' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/c2/audit_kernel.h:377:52: note: in definition of macro 'AUDIT_ASYNC_FINISH'
      audit_async_finish((caddr_t *)&(rp), audit_event, event_modifier, \
                                                        ^~~~~~~~~~~~~~
    ../../common/c2/audit.c:1301:40: note: in expansion of macro 'NULL'
      AUDIT_ASYNC_FINISH(rp, AUE_ENTERPROM, NULL, NULL);
                                            ^~~~
    In file included from ../../common/c2/audit.c:51:0:
    ../../common/c2/audit.h:546:6: note: expected 'au_emod_t {aka short unsigned int}' but argument is of type 'void *'
     void audit_async_finish(caddr_t *, au_event_t, au_emod_t, timestruc_t *);
          ^~~~~~~~~~~~~~~~~~
    In file included from ../../common/c2/audit.c:52:0:
    ../../common/c2/audit.c: In function 'audit_exitprom':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'audit_async_finish' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/c2/audit_kernel.h:377:52: note: in definition of macro 'AUDIT_ASYNC_FINISH'
      audit_async_finish((caddr_t *)&(rp), audit_event, event_modifier, \
                                                        ^~~~~~~~~~~~~~
    ../../common/c2/audit.c:1334:39: note: in expansion of macro 'NULL'
      AUDIT_ASYNC_FINISH(rp, AUE_EXITPROM, NULL, NULL);
                                           ^~~~
    In file included from ../../common/c2/audit.c:51:0:
    ../../common/c2/audit.h:546:6: note: expected 'au_emod_t {aka short unsigned int}' but argument is of type 'void *'
     void audit_async_finish(caddr_t *, au_event_t, au_emod_t, timestruc_t *);
          ^~~~~~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/c2/audit_start.c:29:
    ../../common/c2/audit_start.c: In function 'audit_init_module':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'audit_async_finish' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/c2/audit_start.c:109:53: note: in expansion of macro 'NULL'
      audit_async_finish((caddr_t *)&rp, AUE_SYSTEMBOOT, NULL,
                                                         ^~~~
    In file included from ../../common/c2/audit_start.c:43:0:
    ../../common/c2/audit.h:546:6: note: expected 'au_emod_t {aka short unsigned int}' but argument is of type 'void *'
     void audit_async_finish(caddr_t *, au_event_t, au_emod_t, timestruc_t *);
          ^~~~~~~~~~~~~~~~~~

    ../../common/c2/audit_io.c: In function 'audit_async_start':
    ../../common/c2/audit_io.c:815:26: error: comparison between pointer and integer [-Werror]
      if ((success | failure) == NULL)
                              ^~

    ../../common/c2/audit_event.c: In function 'aui_fchownat':
    ../../common/c2/audit_event.c:869:17: error: comparison between pointer and integer [-Werror]
      if (uap->fname == NULL)
                     ^~
    ../../common/c2/audit_event.c: In function 'aui_fchmodat':
    ../../common/c2/audit_event.c:972:17: error: comparison between pointer and integer [-Werror]
      if (uap->fname == NULL)
                     ^~
    ../../common/c2/audit_event.c: In function 'aus_fchmodat':
    ../../common/c2/audit_event.c:1003:35: error: comparison between pointer and integer [-Werror]
      if (fd == AT_FDCWD || uap->fname != NULL) /* same as chmod() */
                                       ^~
    ../../common/c2/audit_event.c: In function 'aui_fstatat':
    ../../common/c2/audit_event.c:1203:18: error: comparison between pointer and integer [-Werror]
      if (uap->fnamep == NULL)
                      ^~
    ../../common/c2/audit_event.c: In function 'auf_connect':
    ../../common/c2/audit_event.c:3751:18: error: comparison between pointer and integer [-Werror]
        if (uap->addr == NULL)
                      ^~
    ../../common/c2/audit_event.c: In function 'auf_recvfrom':
    ../../common/c2/audit_event.c:4345:18: error: comparison between pointer and integer [-Werror]
        if (uap->from == NULL)
                      ^~
    ../../common/c2/audit_event.c: In function 'auf_sendto':
    ../../common/c2/audit_event.c:4733:16: error: comparison between pointer and integer [-Werror]
        if (uap->to == NULL)
                    ^~

Actions

Also available in: Atom PDF