Description of problem: From https://build.gluster.org/job/fedora-smoke/6/console 11:14:32 /home/jenkins/root/workspace/fedora-smoke/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c: In function ‘aws_download_s3’: 11:14:32 /home/jenkins/root/workspace/fedora-smoke/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/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=] 11:14:32 snprintf(buf, sizeof(buf), "https://%s/%s", priv->hostname, resource); 11:14:32 ^~ ~~~~~~~~ 11:14:32 /home/jenkins/root/workspace/fedora-smoke/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c:480:9: note: ‘snprintf’ output 10 or more bytes (assuming 4105) into a destination of size 1024 11:14:32 snprintf(buf, sizeof(buf), "https://%s/%s", priv->hostname, resource); 11:14:32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11:14:32 cc1: all warnings being treated as errors 11:14:32 make[10]: *** [Makefile:550: libcloudsyncs3.lo] Error 1 And also sign_req variable in aws_form_request is not freed.
REVIEW: https://review.gluster.org/20564 (cloudsync: fix -Werror=format-truncation error on gcc8) posted (#2) for review on master by Susant Palai
COMMIT: https://review.gluster.org/20564 committed in master by "Amar Tumballi" <amarts> 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>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report. glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html [2] https://www.gluster.org/pipermail/gluster-users/