We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1773b7a commit 3dbe11bCopy full SHA for 3dbe11b
src/isomedia/box_code_3gpp.c
@@ -1128,20 +1128,12 @@ void diST_box_del(GF_Box *s)
1128
1129
GF_Err diST_box_read(GF_Box *s, GF_BitStream *bs)
1130
{
1131
- u32 i;
1132
- char str[1024];
1133
GF_DIMSScriptTypesBox *p = (GF_DIMSScriptTypesBox *)s;
1134
1135
- i=0;
1136
- str[0]=0;
1137
- while (1) {
1138
- str[i] = gf_bs_read_u8(bs);
1139
- if (!str[i]) break;
1140
- i++;
1141
- }
1142
- ISOM_DECREASE_SIZE(p, i);
1143
-
1144
- p->content_script_types = gf_strdup(str);
+ p->content_script_types = gf_malloc(sizeof(char) * (s->size+1));
+ if (!p->content_script_types) return GF_OUT_OF_MEM;
+ gf_bs_read_data(bs, p->content_script_types, s->size);
+ p->content_script_types[s->size] = 0;
1145
return GF_OK;
1146
}
1147
0 commit comments