From a0b7103fe412acdf8dd2b99ebdc79fc66acac078 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Thu, 2 Sep 2010 20:43:41 +0000 Subject: [PATCH] * dvb/si.h: Fix segfault with malformed text fields. --- dvb/si.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvb/si.h b/dvb/si.h index fb1aa22..c3bf3e3 100644 --- a/dvb/si.h +++ b/dvb/si.h @@ -207,7 +207,7 @@ static inline char *dvb_string_get(const uint8_t *p_string, size_t i_length, if (i_length) { const char *psz_encoding = dvb_string_get_encoding(&p_string, &i_length); - if (!*psz_encoding || !i_length) { + if (psz_encoding == NULL || !i_length) { /* try one-byte charset */ char *psz_string = malloc(i_length + 1); memcpy(psz_string, p_string, i_length);