On 31.05.20 14:06, r0...@nxlplyx.com wrote:

> Unfortunately there are now four(4) new errors, all appearing to be
> related to the strncat function.
> 
> I don't suppose there is a patch for this?
> 
> -----
> 
> $ make deb
> build/obj/request.do: Compiling dynamic object
> src/request.c: In function ‘sort_and_urlencode_query_string’:
> src/request.c:865:9: error: ‘strncat’ specified bound 1 equals source
> length [-Werror=stringop-overflow=]
>          strncat(result, "&", 1);
>          ^~~~~~~~~~~~~~~~~~~~~~~
> In function ‘sort_and_urlencode_query_string.constprop’,
>     inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
>     inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
>     inlined from ‘setup_request’ at src/request.c:1477:17:
> src/request.c:822:5: error: ‘strncpy’ specified bound depends on the
> length of the source argument [-Werror=stringop-overflow=]
>      strncpy(tokenized, queryString, strlen(queryString) + 1);
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/request.c: In function ‘setup_request’:
> src/request.c:822:37: note: length computed here
>      strncpy(tokenized, queryString, strlen(queryString) + 1);
>                                      ^~~~~~~~~~~~~~~~~~~
> In function ‘sort_and_urlencode_query_string.constprop’,
>     inlined from ‘canonicalize_query_string’ at src/request.c:884:9,
>     inlined from ‘setup_request.part.2’ at src/request.c:1519:5,
>     inlined from ‘setup_request’ at src/request.c:1477:17:
> src/request.c:863:13: error: ‘strncat’ output truncated before
> terminating nul copying as many bytes from a string as its length
> [-Werror=stringop-truncation]
>              strncat(result, appendage, strlen(appendage));
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make: *** [GNUmakefile:223: build/obj/request.do] Error 1

Problem with that is the very very poor code quality of libs3 (which I
have lameted quite often) and newer compilers now warn or error out when
encountering those problems.

I hava another patch at
https://salsa.debian.org/hartge/libs3/-/raw/master/debian/patches/fix-buffer-sizes.patch,
please try if this fixes or at least works around those problems.

Note: no guarantee is made by me that this creates a working or even
safe and secure library.

Grüße,
Sven.



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to