size_t MPEG4Extractor::countTracks() {
 status_t err;
 if ((err = readMetaData()) != OK) {
        ALOGV("MPEG4Extractor::countTracks: no tracks");
 return 0;
 }

 size_t n = 0;
 Track *track = mFirstTrack;
 while (track) {
 ++n;
        track = track->next;
 }

    ALOGV("MPEG4Extractor::countTracks: %d tracks", n);
 return n;
}

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.