From: Volker Lendecke Date: Thu, 19 Apr 2012 08:04:04 +0000 (+0200) Subject: s3: Attempt to fix Coverity ID 2748: INTEGER_OVERFLOW X-Git-Tag: samba-4.0.0alpha20~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc3b79626022e07980be40627b9f2255d58b6e70;p=thirdparty%2Fsamba.git s3: Attempt to fix Coverity ID 2748: INTEGER_OVERFLOW Not sure this will actually please Coverity, but it fixes a severe bug --- diff --git a/source3/lib/msg_channel.c b/source3/lib/msg_channel.c index 9a174c0ed65..65976d1170a 100644 --- a/source3/lib/msg_channel.c +++ b/source3/lib/msg_channel.c @@ -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);