Missing curly braces in rsa_params::operator= (gnutlsxx.cpp)?

Jason Pettiss jpettiss at yahoo.com
Thu Oct 22 18:38:33 CEST 2009


I have version 2.8.4 of the source... tried to check the latest in the CVS repository but the CVS server itself seems to be out of disk space?

Anyway it looks like the error check in rsa_params::operator= is missing a code block and will unconditionally throw.

rsa_params & rsa_params::operator=(const rsa_params& src)
{
    rsa_params* dst = new rsa_params;
    int ret;
    ret = gnutls_rsa_params_cpy( dst->params, src.params);
    if (ret < 0)
        delete dst;
    throw(ret);
    return *dst;
}

Probably should have been:

    if (ret < 0) {
        delete dst;
        throw(ret);
    }

--jason


      





More information about the Gnutls-devel mailing list