gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnutls-dev] [PATCH] Fixing OpenPGP keyring import (again)


From: Timo Schulz
Subject: Re: [gnutls-dev] [PATCH] Fixing OpenPGP keyring import (again)
Date: Tue, 22 May 2007 13:52:06 +0200
User-agent: Icedove 1.5.0.10 (X11/20070329)

Ludovic Courtes wrote:

>>>   err = cdk_stream_tmp_from_mem (data->data, data->size, &input);
>>>   if (!err)
>>>     err = cdk_stream_set_armor_flag (input, 0);
>>>   if (!err)
>>>     err = cdk_keydb_new_from_stream (&keyring->db, 0, input);  

if cdk_stream_tmp_from_mem returns != 0 the
"if (!err)" expression fails and the keydb function is not called.


> `cdk_keydb_new_from_stream ()' does not always initialize INPUT to NULL
> on error, at least not in the OpenCDK currently available in HEAD:

That's right, but with the current code cdk_keydb_new_from_stream is
never called. It would be only called if there is _no_ error!


> And `cdk_stream_close ()' returns an error if STREAM is NULL:
[snip]
> Well, we don't check its return value...

The patch is not very elegant, it works but I guess I shall
cleanup it up.


Thanks,

        Timo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]