[tracker-miners/wip/carlosg/coverity-fixes: 24/28] tracker-extract: Use correct signedness for variable




commit f26301c61bb9c89417eae00f50ef1e1ba8e8585e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Oct 24 12:41:54 2021 +0200

    tracker-extract: Use correct signedness for variable
    
    The extents might be calculated as negative, so use a signed variable
    to hold it.
    
    CID: #366552

 src/tracker-extract/tracker-extract-disc-generic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/tracker-extract/tracker-extract-disc-generic.c 
b/src/tracker-extract/tracker-extract-disc-generic.c
index 97727d328..ecf0f0b09 100644
--- a/src/tracker-extract/tracker-extract-disc-generic.c
+++ b/src/tracker-extract/tracker-extract-disc-generic.c
@@ -154,7 +154,8 @@ ps_disc_read_directory (const guchar *data,
                         PsDiscTime   *time /* out */)
 {
        guint8 *buf;
-       gsize extent, offset;
+       gint extent;
+       gsize offset;
 
        extent = PS_DISC_TIME_TO_EXTENT (time);
        if (extent < 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]