xiaoxiang781216 commented on a change in pull request #2950: URL: https://github.com/apache/incubator-nuttx/pull/2950#discussion_r585500906
########## File path: audio/pcm_decode.c ########## @@ -1087,6 +1090,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, { /* Parse and verify the candidate PCM WAV file header */ +#ifndef CONFIG_AUDIO_FORMAT_RAW if (pcm_parsewav(priv, &apb->samp[apb->curbyte])) Review comment: ```suggestion if (bytesleft >= sizeof(struct wav_header_s) && pcm_parsewav(priv, &apb->samp[apb->curbyte])) ``` or ```suggestion if (pcm_parsewav(priv, &apb->samp[apb->curbyte], bytesleft)) ``` And remove the check at line 1089 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org