Skip to content

Commit

Permalink
Add a sanity check to id3_ucs4_length. Issue #6
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Moon <[email protected]>
  • Loading branch information
triffid committed Oct 7, 2021
1 parent 464498c commit 8bfecd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ucs4.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ id3_ucs4_t const id3_ucs4_empty[] = { 0 };
*/
id3_length_t id3_ucs4_length(id3_ucs4_t const *ucs4)
{
if (!ucs4)
return 0;

id3_ucs4_t const *ptr = ucs4;

while (*ptr)
Expand Down

0 comments on commit 8bfecd7

Please sign in to comment.