• Home
  • Raw
  • Download

Lines Matching refs:hdr

66 	VbDevMusic *hdr = CUSTOM_MUSIC_NOTES;  in VbGetDevMusicNotes()  local
73 "maxsize is %d\n", use_short, hdr, maxsize)); in VbGetDevMusicNotes()
88 if (!hdr || maxsize < sizeof(VbDevMusic)) in VbGetDevMusicNotes()
91 if (0 != Memcmp(hdr->sig, "$SND", sizeof(hdr->sig))) { in VbGetDevMusicNotes()
101 if (hdr->count == 0 || hdr->count > maxnotes) { in VbGetDevMusicNotes()
103 hdr->count, maxnotes)); in VbGetDevMusicNotes()
112 if ((sizeof(VbDevMusicNote) > UINT_MAX / hdr->count) || in VbGetDevMusicNotes()
113 (sizeof(hdr->count) > in VbGetDevMusicNotes()
114 UINT_MAX - hdr->count * sizeof(VbDevMusicNote))) { in VbGetDevMusicNotes()
116 hdr->count)); in VbGetDevMusicNotes()
121 mylen = (uint32_t)(sizeof(hdr->count) + in VbGetDevMusicNotes()
122 hdr->count * sizeof(VbDevMusicNote)); in VbGetDevMusicNotes()
123 mysum = Crc32(&(hdr->count), mylen); in VbGetDevMusicNotes()
125 if (mysum != hdr->checksum) { in VbGetDevMusicNotes()
127 mysum, hdr->checksum)); in VbGetDevMusicNotes()
131 VBDEBUG(("VbGetDevMusicNotes: custom notes struct at %p\n", hdr)); in VbGetDevMusicNotes()
140 for (i=0; i < hdr->count; i++) { in VbGetDevMusicNotes()
141 this_msecs = hdr->notes[i].msec ; in VbGetDevMusicNotes()
145 hdr->notes[i].frequency >= 100 && in VbGetDevMusicNotes()
146 hdr->notes[i].frequency <= 2000) in VbGetDevMusicNotes()
167 if (hdr->count > (UINT_MAX / sizeof(VbDevMusicNote) - 1)) { in VbGetDevMusicNotes()
173 notebuf = VbExMalloc((hdr->count + 1) * sizeof(VbDevMusicNote)); in VbGetDevMusicNotes()
174 Memcpy(notebuf, hdr->notes, hdr->count * sizeof(VbDevMusicNote)); in VbGetDevMusicNotes()
175 count = hdr->count; in VbGetDevMusicNotes()
184 notebuf[hdr->count].msec = this_msecs; in VbGetDevMusicNotes()
185 notebuf[hdr->count].frequency = 0; in VbGetDevMusicNotes()