Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2015 17:15:42 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        "Pedro F. Giffuni" <pfg@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r281858 - head/lib/libc/regex
Message-ID:  <20150422171542.GA4240@FreeBSD.org>
In-Reply-To: <201504221709.t3MH93vD054506@svn.freebsd.org>
References:  <201504221709.t3MH93vD054506@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 22, 2015 at 05:09:03PM +0000, Pedro F. Giffuni wrote:
> New Revision: 281858
> URL: https://svnweb.freebsd.org/changeset/base/281858
> 
> Log:
>   computematchjumps(): fix allocator sizeof operand mismatch.
> [...]
> -	pmatches = (int*) malloc(g->mlen * sizeof(unsigned int));
> +	pmatches = (int*) malloc(g->mlen * sizeof(int));
>  	if (pmatches == NULL) {
>  		g->matchjump = NULL;
>  		return;
>  	}
>  
> -	g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int));
> +	g->matchjump = (int*) malloc(g->mlen * sizeof(int));

Since you've touched these lines, you could'be also removed (int *)
casting from malloc() calls.  But now it's too late (does not warrant
another commit).

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150422171542.GA4240>