From db2a11ac40367d87c0b2283cd3477ecf525b5e7d Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Thu, 24 Mar 2016 09:22:22 +0000 Subject: [PATCH] fixed size of minimal string while checking base url --- src/dumper_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dumper_thread.c b/src/dumper_thread.c index faf8cff..7007a1e 100644 --- a/src/dumper_thread.c +++ b/src/dumper_thread.c @@ -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); -- 2.34.1