Skip to content

Commit

Permalink
libjcat: Correct one more case where uncompiled engine causes failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Limonciello authored and hughsie committed Oct 23, 2020
1 parent 109399e commit 583df67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libjcat/jcat-context.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,16 @@ jcat_context_verify_item (JcatContext *self,
/* all checksum engines must verify */
for (guint i = 0; i < blobs->len; i++) {
JcatBlob *blob = g_ptr_array_index (blobs, i);
g_autoptr(GError) error_local = NULL;
g_autoptr(JcatEngine) engine = NULL;
g_autoptr(JcatResult) result = NULL;

/* get engine */
engine = jcat_context_get_engine (self, jcat_blob_get_kind (blob), error);
if (engine == NULL)
return NULL;
engine = jcat_context_get_engine (self, jcat_blob_get_kind (blob), &error_local);
if (engine == NULL) {
g_debug ("%s", error_local->message);
continue;
}
if (jcat_engine_get_method (engine) != JCAT_BLOB_METHOD_CHECKSUM)
continue;
result = jcat_engine_self_verify (engine, data, jcat_blob_get_data (blob), flags, error);
Expand Down

0 comments on commit 583df67

Please sign in to comment.