[tracker/wip/carlosg/coverity-warnings: 4/18] libtracker-data: Add paranoia check in condition
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/coverity-warnings: 4/18] libtracker-data: Add paranoia check in condition
- Date: Sun, 21 Mar 2021 20:56:34 +0000 (UTC)
commit 30d88b36d25f092f5186097886a585843922d52b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Mar 20 11:18:25 2021 +0100
libtracker-data: Add paranoia check in condition
According to Coverity, there's weird paths that may cause an ontology
change on a new class that may still result on us trying to update the
range of a related property.
It remains to be seen whether the combination of circumstances that
lead to this can ever happen together, but it's simple enought to add
the paranoia check as those variables where we are composing the ALTER
TABLE would be actually empty.
CID: #1501144
src/libtracker-data/tracker-data-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 5860b10b0..7f7a0eb54 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2950,7 +2950,7 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
put_change = TRUE;
}
- if (in_change && put_change) {
+ if (in_change && put_change && in_col_sql && sel_col_sql) {
range_change_for (property, in_col_sql, sel_col_sql, field_name);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]