Skip to content

Commit

Permalink
strcpy buffer overflow in isom_write (fixes #2713)
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliendavid committed Jan 8, 2024
1 parent 8684dfb commit 7aef803
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isomedia/isom_write.c
Expand Up @@ -4574,7 +4574,8 @@ GF_Err gf_isom_new_generic_sample_description(GF_ISOFile *movie, u32 trackNumber
entry->spatial_quality = udesc->spatial_quality;
entry->Width = udesc->width;
entry->Height = udesc->height;
strcpy(entry->compressor_name, udesc->compressor_name);
strncpy(entry->compressor_name, udesc->compressor_name, GF_ARRAY_LENGTH(entry->compressor_name));
entry->compressor_name[ GF_ARRAY_LENGTH(entry->compressor_name) - 1] = 0;
entry->color_table_index = -1;
entry->frames_per_sample = 1;
entry->horiz_res = udesc->h_res ? udesc->h_res : 0x00480000;
Expand Down

0 comments on commit 7aef803

Please sign in to comment.