openbsd-ports/audio/scmpc/patches/patch-src_audioscrobbler_c

13 lines
391 B
Plaintext

$OpenBSD: patch-src_audioscrobbler_c,v 1.1 2007/06/22 12:34:13 msf Exp $
--- src/audioscrobbler.c.orig Fri Jun 22 02:50:36 2007
+++ src/audioscrobbler.c Fri Jun 22 02:50:52 2007
@@ -743,6 +743,8 @@ static void queue_load(void)
}
while (getline(&line, &buffer_size, cache_file) != -1) {
+ if (line == NULL)
+ break;
char *p = strchr(line, '\n');
if (p != NULL)
*p = '\0';