[Bugs] [Bug 789278] Issues reported by Coverity static analysis tool

bugzilla at redhat.com bugzilla at redhat.com
Thu Apr 2 13:27:56 UTC 2015


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



--- Comment #558 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10058 committed in master by Vijay Bellur
(vbellur at redhat.com) 
------
commit f4be9bc3c530ab35a0cd1939df8c43abe54e540d
Author: Michael Adam <obnox at samba.org>
Date:   Tue Mar 31 02:28:07 2015 +0200

    features/changelog: fix possible illegal mem access (CID 1288822)

    Coverity CID 1288822 (#1 of 2)

    strncpy executed with a limit equal to the target array
    size potentially leaves the target string not null terminated.

    In this case the strncpy is not needed due to the snprintf
    with the same target buffer which follows immediately.

    This patch also removes the now unneeded scratch_dir
    argument to gf_changelog_init_history(), which is semantically
    correct, since scratch_dir has previously been filled into
    jnl->jnl_working_dir by the caller, and this is now used to
    fill hist_scratch_dir.

    Change-Id: Ib1ed3a1058e80e34191758921b49c29030d6c9db
    BUG: 789278
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-on: http://review.gluster.org/10058
    Reviewed-by: Kotresh HR <khiremat at redhat.com>
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>

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


More information about the Bugs mailing list