opj_decompress: fix null pointer dereference on comps[].data on id_000167,sig_11...
[openjpeg.git] / src / bin / jp2 / opj_compress.c
index 2ef1c6be608a36a3479173cd8388466c95ffd42e..1bbcebde148cd1a73858b29d6762f997439c2817 100644 (file)
@@ -1694,7 +1694,8 @@ OPJ_FLOAT64 opj_clock(void)
     /* cout << "freq = " << ((double) freq.QuadPart) << endl; */
     /* t is the high resolution performance counter (see MSDN) */
     QueryPerformanceCounter(& t) ;
-    return freq.QuadPart ? (t.QuadPart / (OPJ_FLOAT64) freq.QuadPart) : 0 ;
+    return freq.QuadPart ? ((OPJ_FLOAT64) t.QuadPart / (OPJ_FLOAT64) freq.QuadPart)
+           : 0 ;
 #else
     /* Unix or Linux: use resource usage */
     struct rusage t;