[PATCH] cryptui: use add_oid_to_usage correctly (Coverity)
juan.lang at gmail.com
Fri Feb 1 17:48:27 CST 2013
On Fri, Feb 1, 2013 at 3:45 PM, Juan Lang <juan.lang at gmail.com> wrote:
> Hi Marcus,
> - add_oid_to_usage(usage, ptr);
> + usage = add_oid_to_usage(usage, ptr);
> This looks fine, but would you mind making the same change on line 337?
> Actually, perhaps I hit sent too early. If this memory allocation fails,
which is the only situation under which add_oid_to_usage doesn't just
return its first parameter, it'll immediately crash on the next invocation
with a NULL pointer dereference.
I'm not sure it's worth all the trouble in an out of memory situation.
Perhaps just remove the return value and let the caller crash.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel