Changeset 772 for GPL/trunk/alsa-kernel/synth/emux/soundfont.c
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/synth/emux/soundfont.c
r703 r772 704 704 struct soundfont_sample_info sample_info; 705 705 struct snd_sf_sample *sp; 706 long off;707 706 708 707 /* patch must be opened */ … … 714 713 return -EINVAL; 715 714 715 if (count < (long)sizeof(sample_info)) { 716 return -EINVAL; 717 } 716 718 if (copy_from_user(&sample_info, data, sizeof(sample_info))) 717 719 return -EFAULT; 718 719 off = sizeof(sample_info); 720 721 if (sample_info.size != (count-off)/2) 720 data += sizeof(sample_info); 721 count -= sizeof(sample_info); 722 723 // SoundFont uses S16LE samples. 724 if (sample_info.size * 2 != count) 722 725 return -EINVAL; 723 726 … … 747 750 rc = sflist->callback.sample_new 748 751 (sflist->callback.private_data, sp, sflist->memhdr, 749 data + off, count - off);752 data, count); 750 753 if (rc < 0) { 751 754 sf_sample_delete(sflist, sf, sp); … … 960 963 if (copy_from_user(&patch, data, sizeof(patch))) 961 964 return -EFAULT; 962 963 965 count -= sizeof(patch); 964 966 data += sizeof(patch); 967 968 if ((patch.len << (patch.mode & WAVE_16_BITS ? 1 : 0)) != count) 969 return -EINVAL; 965 970 966 971 sf = newsf(sflist, SNDRV_SFNT_PAT_TYPE_GUS|SNDRV_SFNT_PAT_SHARED, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.