diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-05-24 23:45:56 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-05-24 23:45:56 +0200 |
commit | 65d2a34b3b954e7e4bc0739ba3505f251c0bfdbb (patch) | |
tree | 01ce551da61300a1cfe3d3394996a0d9d92165a6 | |
parent | 95c21a502abfad1820b91f7dcd56b9ae423ae631 (diff) | |
download | gnutls-65d2a34b3b954e7e4bc0739ba3505f251c0bfdbb.tar.gz |
Better checks in loops.origin/new
-rw-r--r-- | lib/gnutls_algorithms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c index 2f08e7b7c5..2ba242204f 100644 --- a/lib/gnutls_algorithms.c +++ b/lib/gnutls_algorithms.c @@ -2021,7 +2021,7 @@ _gnutls_x509_oid2sign_algorithm (const char *oid) { gnutls_sign_algorithm_t ret = 0; - GNUTLS_SIGN_LOOP (if (strcmp (oid, p->oid) == 0) + GNUTLS_SIGN_LOOP (if (p->oid && strcmp (oid, p->oid) == 0) { ret = p->id; break;} ); @@ -2244,7 +2244,7 @@ _gnutls_x509_oid2pk_algorithm (const char *oid) const gnutls_pk_entry *p; for (p = pk_algorithms; p->name != NULL; p++) - if (strcmp (p->oid, oid) == 0) + if (p->oid && strcmp (p->oid, oid) == 0) { ret = p->id; break; |