[Spice-devel] [PATCH 3/3] Fix "NULL_RETURNS" caught by coverity

Christophe Fergeau cfergeau at redhat.com
Mon Aug 4 06:39:00 PDT 2014


On Mon, Jul 14, 2014 at 01:44:45PM +0200, Fabiano Fidêncio wrote:
> On Mon, Jul 14, 2014 at 1:30 PM, Marc-André Lureau <mlureau at redhat.com>
> wrote:
> > Could malloc & free do not have annotations like the glib ones.
> >
> > What happens for example if you replace malloc() by g_malloc(), and free()
> > by g_free() in the function below?
> >
> 
> I don't think that would help as one of the Coverity's complaints came
> from: "data = g_malloc(d->area.width * d->area.height * 3);"

Did it complain about an unchecked return value? It could be complaining
about a potential integer overflow when computing how much to alloc.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140804/f76a38f7/attachment.sig>


More information about the Spice-devel mailing list