File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,17 @@ static bool validate_uac3_feature_unit(const void *p,
221221 return d -> bLength >= sizeof (* d ) + 4 + 2 ;
222222}
223223
224+ static bool validate_uac3_power_domain_unit (const void * p ,
225+ const struct usb_desc_validator * v )
226+ {
227+ const struct uac3_power_domain_descriptor * d = p ;
228+
229+ if (d -> bLength < sizeof (* d ))
230+ return false;
231+ /* baEntities[] + wPDomainDescrStr */
232+ return d -> bLength >= sizeof (* d ) + d -> bNrEntities + 2 ;
233+ }
234+
224235static bool validate_midi_out_jack (const void * p ,
225236 const struct usb_desc_validator * v )
226237{
@@ -285,6 +296,7 @@ static const struct usb_desc_validator audio_validators[] = {
285296 struct uac3_clock_multiplier_descriptor ),
286297 /* UAC_VERSION_3, UAC3_SAMPLE_RATE_CONVERTER: not implemented yet */
287298 /* UAC_VERSION_3, UAC3_CONNECTORS: not implemented yet */
299+ FUNC (UAC_VERSION_3 , UAC3_POWER_DOMAIN , validate_uac3_power_domain_unit ),
288300 { } /* terminator */
289301};
290302
You can’t perform that action at this time.
0 commit comments