Debian packaged Perl modules should be installed into the vendor
directories (currently /usr/lib/perl5 and /usr/share/perl5), but the
upstream default puts the into the 'site' ones (modified with the
PREFIX setting.) Explicitly using INSTALLDIRS=vendor simplifies
the install rules and removes the need for PREFIX, which has
been deprecated in ExtUtils::MakeMaker for a long time.
Clang was wrong on one instance, a value must be initialized to its NULL
state before using any lasso_assign_ macro with it.
Bug introduced in 4789e8d4d6.
encode_key may be release when not initialized if va_args returns null
on the first while loop.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Ina number of cases function inputs are not checked for NULL although
values may end up with a NULL value and then they are dereferenced
directly.
Check values in the function (or the caller) if appropriate.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Sounds like these should all be boolean 'OR's, otherwise,
if profile is not in fact a lasso profile then profile->private_data
will be dereferenced even if it is NULL.
Found by Clang
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
The compiler was complaining that 'compa' could be uninitialized.
USe this occasion to make the code simpler to understand and assign
actually meaningful values to the variable, even though the proper
actions are not implemented yet.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
The rc error was being set but then it was being ignored.
Get out immediately if an Issuer can't be found.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
These conditions can never be reached as the list is filtered with
and and to the value of 0xff, so just drop them, they are misleading.
(Also silences checkers which were screaming of deadcode, for each and
every unmatchable value ...)
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Coverity was marking the check for tsnippet after the while loop,
confused by the check. Make it more readable, and in the process
make checkers happy too.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
The compiler complain about these values not being initialized.
come of them do not really matter as they are only really used when
later initialized in the code and the code paths would not use them
if not initialized in a previous block, however some of these seem
real issues.
In all cases make the compiler happy so we get less noise in the build
and less false positives in code chckers.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Initialize the sig_alg value to NULL (The compilers was complaining it may
be used initialized), but also make sure to check the re is any sig_alg at
all, otherwise return a proper error.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Coverity was marking this as an array overun as the check would never be
possible and wuld allow any value for query_request_type, including "unset"
wihch is 0.
fix the boundary checks.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
These values where being used without being initialized at least in some edge
cases. Make Coverity happy by properly initializing them.
Some of these are real bugs, not just silencing a tool.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Coverity was complaining that tm was used uninitialized, but the truth is
that a third error condition where the string passed in matches no valid
format was not handled. Just return an error in that case.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Coverity was complaining that 'integer' was being used without
initialization (from the caller). Turns out it was erroneously used
to test the result instead of the just sourced 'what'.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Coverity complains that in a number of places errors are not checked.
Some of them are ok not to check so put a silencing (void).
Check errors that need to be checked.
Coverity also complains g_malloc() return is never checked but given it is
never checked anywahere let it be for now.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Although in this cases it may be safe to omit va_end() that is not generally
so with an arbitrary compiler on an arbitrary platform.
Quoting from the spec: "Each invocation of va_start() must be matched by
a corresponding invocation of va_end() in the same function."
note the "must"
Checker tools like Coverity complain if va_start() is not always paired with
va_end(), so this patch mutes them.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
All number types including enums are parse as if they were integers,
this breaks in many ways, long and int are not the same size in all
architectures as well as enum may vary in size depening on compiler,
architecture and optimizations.
Always pass an actual long to PyArg_ParseTuple() and rely on the a
cast from long to the destination variable type in the following
assignment.
Signed-off-by: Simo Sorce <simo@redhat.com>