Task #130627 - fixed.err

back to task #130627
download
Error: COMPILER_WARNING (CWE-476):
attr-2.5.2/libattr/attr_copy_fd.c: scope_hint: In function 'attr_copy_fd'
attr-2.5.2/libattr/attr_copy_fd.c:128:24: warning[-Wnonnull]: argument 3 is null but the corresponding size argument 4 value is [1, 9223372036854775807]
#  128 |                 size = fgetxattr (src_fd, name, value, size);
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr-2.5.2/libattr/attr_copy_fd.c:25: included_from: Included from here.
/usr/include/sys/xattr.h:73:16: note: in a call to function 'fgetxattr' declared with attribute 'access (write_only, 3, 4)'
#   73 | extern ssize_t fgetxattr (int __fd, const char *__name, void *__value,
#      |                ^~~~~~~~~
#  126|   			ret = -1;
#  127|   		}
#  128|-> 		size = fgetxattr (src_fd, name, value, size);
#  129|   		if (size < 0) {
#  130|   			const char *qpath = quote (ctx, src_path);

Error: COMPILER_WARNING (CWE-476):
attr-2.5.2/libattr/attr_copy_file.c: scope_hint: In function 'attr_copy_file'
attr-2.5.2/libattr/attr_copy_file.c:126:24: warning[-Wnonnull]: argument 3 is null but the corresponding size argument 4 value is [1, 9223372036854775807]
#  126 |                 size = lgetxattr (src_path, name, value, size);
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr-2.5.2/libattr/attr_copy_file.c:25: included_from: Included from here.
/usr/include/sys/xattr.h:67:16: note: in a call to function 'lgetxattr' declared with attribute 'access (write_only, 3, 4)'
#   67 | extern ssize_t lgetxattr (const char *__path, const char *__name,
#      |                ^~~~~~~~~
#  124|   			ret = -1;
#  125|   		}
#  126|-> 		size = lgetxattr (src_path, name, value, size);
#  127|   		if (size < 0) {
#  128|   			const char *qpath = quote (ctx, src_path);

Error: COMPILER_WARNING:
attr-2.5.2/libattr/libattr.c: scope_hint: In function 'attr_list'
attr-2.5.2/libattr/libattr.c:279:9: warning[-Wstringop-truncation]: 'strncpy' specified bound depends on the length of the source argument
#  279 |         strncpy(aentp->a_name, name, size - sizeof(aentp->a_valuelen));
#      |         ^
attr-2.5.2/libattr/libattr.c:269:28: note: length computed here
#  269 |         int size = roundup(strlen(name) + 1 + sizeof(aentp->a_valuelen), 8);
#      |                            ^~~~~~~~~~~~
#  277|   	aentp = (attrlist_ent_t *)&buffer[ *end_offset ];
#  278|   	aentp->a_valuelen = valuelen;
#  279|-> 	strncpy(aentp->a_name, name, size - sizeof(aentp->a_valuelen));
#  280|   
#  281|   	*start_offset += sizeof(alist->al_offset);