fixed size of minimal string while checking base url
authorFrank Schreiner <schreiner@suse.de>
Thu, 24 Mar 2016 09:22:22 +0000 (09:22 +0000)
committerFrank Schreiner <schreiner@suse.de>
Thu, 24 Mar 2016 09:22:22 +0000 (09:22 +0000)
src/dumper_thread.c

index faf8cff3ef447fc50a47bcd9544c1f413a936182..7007a1e10d053115683104f136d07390b03b27b1 100644 (file)
@@ -256,7 +256,7 @@ load_rpm(const char *fullpath,
         size_t lb_length = strlen(location_base);
         gchar *t_location_base = g_malloc0(lb_length + 32);
         strcpy(t_location_base, location_base);
-        if (lb_length > 2 && g_strcmp0(location_base + lb_length - 3, "://") == 0)
+        if (lb_length > 3 && g_strcmp0(location_base + lb_length - 3, "://") == 0)
             lb_length -= 2;
         sprintf(t_location_base + lb_length, "#%d", media_id);
         pkg->location_base = cr_safe_string_chunk_insert(pkg->chunk, t_location_base);