File 0006-Don-t-bail-if-there-was-no-error-buf-could-have-been.patch of Package file.278

From 6bf45271eb8e0e6577b92042ce2003ba998d1686 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 4 Dec 2014 15:22:05 +0000
Subject: [PATCH] Don't bail if there was no error, buf could have been NULL
 on entry.

---
 src/softmagic.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/softmagic.c src/softmagic.c
index cd34890..0c36cd8 100644
--- src/softmagic.c
+++ src/softmagic.c
@@ -1700,7 +1700,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
 			fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
 
 		rbuf = file_pop_buffer(ms, pb);
-		if (rbuf == NULL)
+		if (rbuf == NULL && ms->event_flags & EVENT_HAD_ERR)
 			return -1;
 
 		if (rv == 1) {
-- 
1.7.9.2

openSUSE Build Service is sponsored by