Browse Source

* dvb/si.h: Fix segfault with malformed text fields.

master
Christophe Massiot 14 years ago
parent
commit
a0b7103fe4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      dvb/si.h

+ 1
- 1
dvb/si.h View File

@ -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);

Loading…
Cancel
Save