Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: third_party/qcms/src/transform_util.c

Issue 2815303003: [qcms] Disable advisory asserts when running in libfuzzer (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/qcms/src/transform.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/qcms/src/transform_util.c
diff --git a/third_party/qcms/src/transform_util.c b/third_party/qcms/src/transform_util.c
index 7db8c7533f474e5efc716a4092858d06c4c00d6d..1d7b153ad5e41d1e78dbcca457d887646d27c1e5 100644
--- a/third_party/qcms/src/transform_util.c
+++ b/third_party/qcms/src/transform_util.c
@@ -32,6 +32,12 @@
#define INFINITY HUGE_VAL
#endif
+#ifdef USE_LIBFUZZER
+#define ASSERT(x)
+#else
+#define ASSERT(x) assert(x)
+#endif
+
#define PARAMETRIC_CURVE_TYPE 0x70617261 //'para'
/* value must be a value between 0 and 1 */
@@ -182,7 +188,7 @@ void compute_curve_gamma_table_type_parametric(float gamma_table[256], float par
f = parameter[6];
interval = parameter[4];
} else {
- assert(0 && "invalid parametric function type.");
+ ASSERT(0 && "invalid parametric function type.");
a = 1;
b = 0;
c = 0;
« no previous file with comments | « third_party/qcms/src/transform.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698