$OpenBSD: patch-plugins_artwork_artwork_c,v 1.3 2014/09/23 15:03:39 dcoppa Exp $

commit 4553baa0e78eb91d7de582b341831fac87e9842c
Author: Alexey Yakovenko <waker@users.sourceforge.net>
Date:   Mon Aug 18 22:32:07 2014 +0200

artwork: crash fix when file mask is empty (bug #1177)

--- plugins/artwork/artwork.c.orig	Thu Jul 31 21:03:51 2014
+++ plugins/artwork/artwork.c	Tue Sep 23 16:28:20 2014
@@ -50,8 +50,13 @@
 #include "lastfm.h"
 #include "albumartorg.h"
 #include "wos.h"
+#include "../../strdupa.h"
 #endif
 
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define alloca(size)   __builtin_alloca(size)
+#endif
+
 #ifdef USE_IMLIB2
 #include <Imlib2.h>
 static uintptr_t imlib_mutex;
@@ -970,7 +975,7 @@ fetcher_thread (void *none)
             cover_query_t *param = queue;
             char path [PATH_MAX];
             struct dirent **files;
-            int files_count;
+            int files_count = 0;
 
             make_cache_dir_path (path, sizeof (path), param->artist, -1);
             trace ("cache folder: %s\n", path);
