]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Attempt to fix Coverity ID 2748: INTEGER_OVERFLOW
authorVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 08:04:04 +0000 (10:04 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 15:37:37 +0000 (17:37 +0200)
Not sure this will actually please Coverity, but it fixes a severe bug

source3/lib/msg_channel.c

index 9a174c0ed65fae8582faf19f994271ccf2ae01c8..65976d1170aeba6b9c01ac8a1e414665d9bf0eca 100644 (file)
@@ -300,7 +300,7 @@ static void msg_channel_trigger(struct tevent_context *ev,
        state->rec = talloc_move(state, &channel->msgs[0]);
 
        memmove(channel->msgs, channel->msgs+1,
-               sizeof(struct messaging_rec) * (num_msgs-1));
+               sizeof(struct messaging_rec *) * (num_msgs-1));
        channel->msgs = talloc_realloc(
                channel, channel->msgs, struct messaging_rec *, num_msgs - 1);