Task #123063 - added.err
back to task #123063download
Error: CPPCHECK_WARNING (CWE-476): osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: GCC_ANALYZER_WARNING (CWE-688): osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function 'gnu_ext_crypt' osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ret' where non-null expected osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here. /usr/include/string.h:156:14: note: argument 1 of 'strcpy' must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: GCC_ANALYZER_WARNING (CWE-688): osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function ‘gnu_ext_crypt’ osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here. /usr/include/string.h:156:14: note: argument 1 of ‘strcpy’ must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: CPPCHECK_WARNING (CWE-476): osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:61: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60| strcpy(ret, enc); # 61|-> ret[strlen(enc)]= '\0'; # 62| # 63| return ret;