[PATCH libassuan] Fix NULL pointer dereference in _assuan_error().

Werner Koch wk at gnupg.org
Thu Nov 15 11:28:29 CET 2012

On Thu, 15 Nov 2012 09:29, xi.wang at gmail.com said:

> JOOC, did they ever triggered NULL pointer dereferences?  Some functions
> seem to explicitly allow NULL ctx, such as assuan_sendfd():

I can't remember and would need to search for it.

>  /* Generate an error code specific to a context.  */
> -#define _assuan_error(ctx, errcode) gpg_err_make ((ctx)->err_source, errcode)
> +#define _assuan_error(ctx, errcode) \
> +  gpg_err_make ((ctx) ? (ctx)->err_source : GPG_ERR_SOURCE_DEFAULT, errcode)

We don't have a default source id for libassuan.  I may take this as an
opportunity to add one for Libassuan.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-devel mailing list