[Bugs] [Bug 1609126] Fix mem leak and smoke failure for gcc8 in cloudsync

bugzilla at redhat.com bugzilla at redhat.com
Mon Aug 13 14:43:07 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1609126

Worker Ant <bugzilla-bot at gluster.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|POST                        |MODIFIED



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/20564 committed in master by "Amar Tumballi"
<amarts at redhat.com> with a commit message- cloudsync: fix
-Werror=format-truncation error on gcc8

Here is the gcc8 warning:

libcloudsyncs3.c: In function ‘aws_download_s3’:
libcloudsyncs3.c:480:48: error: ‘%s’ directive output may be
truncated writing up to 4095 bytes into a region of size
1015 [-Werror=format-truncation=]
snprintf(buf, sizeof(buf), "https://%s/%s", priv->hostname, resource);
libcloudsyncs3.c:480:9: note: ‘snprintf’ output 10 or more bytes
(assuming 4105) into a destination of size 1024
snprintf(buf, sizeof(buf), "https://%s/%s", priv->hostname, resource);

Memleak:

It fixes a memleak as well where sign_req in fn: aws_form_request was
not freed. Adjusted the calloc size for sign_req as well to match with
the demand.

Test:

Have tested the local cloudsync regression test to validate the changes.
Smoke validation will be sufficient for the gcc8 warning fixes.

Fixes: bz#1609126
Change-Id: I1c537b30168f2e0b54862344a951843e86b0b488
Signed-off-by: Susant Palai <spalai at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list