Error: NULL_RETURNS (CWE-476):
rsyslog-7.4.10/plugins/omsnmp/omsnmp.c:264: returned_null: Function "malloc(size_t)" returns null (checked 140 out of 168 times).
rsyslog-7.4.10/action.c:1197: example_checked: Example 1: "malloc(batchNumMsgs(pBatch) * 1UL)" has its value checked in "(active = malloc(batchNumMsgs(pBatch) * 1UL)) == NULL".
rsyslog-7.4.10/grammar/lexer.l:302: example_checked: Example 2: "malloc(40UL)" has its value checked in "(bs = malloc(40UL)) == NULL".
rsyslog-7.4.10/grammar/rainerscript.c:2483: example_checked: Example 3: "malloc(8UL)" has its value checked in "(ar->arr = malloc(8UL)) == NULL".
rsyslog-7.4.10/plugins/imklog/bsd.c:221: example_checked: Example 4: "malloc(1UL * (iMaxLine + 1))" has its value checked in "(pRcv = (uchar *)malloc(1UL * (iMaxLine + 1))) == NULL".
rsyslog-7.4.10/plugins/imuxsock/imuxsock.c:968: example_checked: Example 5: "malloc(1UL * (iMaxLine + 1))" has its value checked in "(pRcv = (uchar *)malloc(1UL * (iMaxLine + 1))) == NULL".
rsyslog-7.4.10/plugins/omsnmp/omsnmp.c:264: var_assigned: Assigning: "pdu->enterprise" = null return value from "malloc(size_t)".
rsyslog-7.4.10/plugins/omsnmp/omsnmp.c:265: dereference: Dereferencing a pointer that might be null "pdu->enterprise" when calling "memcpy(void * restrict, void const * restrict, size_t)".
Replace putenv() with setenv() which handles memory allocation by itself.
Error: CLANG_WARNING:
rsyslog-7.4.10/plugins/omsnmp/omsnmp.c:206:2: warning: Null pointer passed as an argument to a 'nonnull' parameter
This concludes the removal of the new scoping interface, at least as
far as pre v6-plugins are affected. Full code cleanup will happen
in the v6.3 branch.
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
The output interface has been changed, but we do not yet utilize the
new interface. Also, it looks like a regression was introduced. But before
hunting it down, I'd like to make a commit (what also easys the regresion
hunt).
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
... by moving code to stream.c. Thanks to the new design, new cases are
not really needed, resulting in cleaner code.
I also did a cleanup of header file usage as a side-activity.
pkg-config uses uppercase for its _CFLAGS and _LIBS variable names.
So we follow suit and convert all _cflags and _libs variables to
uppercase for more consistency.
adiscon monitorware and will be used by default from now on. The mibs
can be found in the mibs folder of the omsnmp directory. For more
details please see the documentation. Also added a new configuration
variable $actionsnmptrapoid which defines the trap-type or
notification-type that is used.
instance data. So this means we open and close the session only once
per session. If sending fails, we reinit the snmp session, so suspend
and resume is now fully and correctly supported. May need some more
testing against tcp based snmp receivers.