Skip to content

Commit

Permalink
Fix divide-by-zero crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Oct 9, 2018
1 parent 3ad38ef commit 1af4c81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GPMF_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* @brief GPMF Parser library
*
* @version 1.2.0
* @version 1.2.1
*
* (C) Copyright 2017 GoPro Inc (http://gopro.com/).
*
Expand Down Expand Up @@ -1019,6 +1019,8 @@ GPMF_ERR GPMF_ScaledData(GPMF_stream *ms, void *buffer, uint32_t buffersize, uin
{
complextype[0] = type;
inputtypesize = GPMF_SizeofType(type);
if (inputtypesize == 0)
return GPMF_ERROR_MEMORY;
inputtypeelements = 1;
elements = sample_size / inputtypesize;
}
Expand Down

0 comments on commit 1af4c81

Please sign in to comment.