| |
@@ -678,14 +678,14 @@
|
| |
if (cert_storage != e->cm_cert_storage_type) {
|
| |
continue;
|
| |
}
|
| |
- if (strcmp(cert_location, e->cm_cert_storage_location) != 0) {
|
| |
+ if ((e->cm_cert_storage_location == NULL) || strcmp(cert_location, e->cm_cert_storage_location) != 0) {
|
| |
continue;
|
| |
}
|
| |
switch (cert_storage) {
|
| |
case cm_cert_storage_file:
|
| |
break;
|
| |
case cm_cert_storage_nssdb:
|
| |
- if (strcmp(cert_nickname, e->cm_cert_nickname) != 0) {
|
| |
+ if ((e->cm_cert_nickname == NULL) || strcmp(cert_nickname, e->cm_cert_nickname) != 0) {
|
| |
continue;
|
| |
}
|
| |
break;
|
| |
A user reported a segfault which was due to a broken request.
How it got broken I have no idea but it was effectively empty.
It had everything as defaults: 0, -1, UNSPECIFIED or not
present at all.
So when trying to analyze the request it did a NULL compare.
https://pagure.io/certmonger/issue/191