diff --git a/meson.build b/meson.build index e6169ad052..5c02ab8664 100644 --- a/meson.build +++ b/meson.build @@ -2979,7 +2979,6 @@ if spatch.found() coccinelle_exclude = [ 'src/basic/', 'src/core/', - 'src/import/', 'src/journal/', 'src/libsystemd/', 'src/network/', diff --git a/src/import/curl-util.c b/src/import/curl-util.c index 4747d0993a..bddc93d52b 100644 --- a/src/import/curl-util.c +++ b/src/import/curl-util.c @@ -359,6 +359,8 @@ int curl_header_strdup(const void *contents, size_t sz, const char *field, char const char *p; char *s; + assert(value); + p = memory_startswith_no_case(contents, sz, field); if (!p) return 0; diff --git a/src/import/import-compress.c b/src/import/import-compress.c index f893abc43e..aca4041f2a 100644 --- a/src/import/import-compress.c +++ b/src/import/import-compress.c @@ -318,6 +318,10 @@ static int enlarge_buffer(void **buffer, size_t *buffer_size, size_t *buffer_all size_t l; void *p; + assert(buffer); + assert(buffer_size); + assert(buffer_allocated); + if (*buffer_allocated > *buffer_size) return 0; diff --git a/src/import/pull-common.c b/src/import/pull-common.c index cc06fe4f1d..c0e0e9907e 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -622,6 +622,7 @@ int pull_job_restart_with_sha256sum(PullJob *j, char **ret) { int r; assert(j); + assert(ret); /* Generic implementation of a PullJobNotFound handler, that restarts the job requesting SHA256SUMS */ diff --git a/src/import/qcow2-util.c b/src/import/qcow2-util.c index 77298bcbe2..dd5c3c23ec 100644 --- a/src/import/qcow2-util.c +++ b/src/import/qcow2-util.c @@ -150,6 +150,10 @@ static int normalize_offset( bool *compressed, uint64_t *compressed_size) { + assert(ret); + POINTER_MAY_BE_NULL(compressed); + POINTER_MAY_BE_NULL(compressed_size); + uint64_t q; q = be64toh(p);