summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-03-09 14:15:20 +0700
committerhathach <[email protected]>2026-03-09 14:15:20 +0700
commit0d4feff0eb01511d413e79109656dd76bf42e77a (patch)
treef412cf9874704315d27bebb62f1cd07bcb3a8301 /src/common
parent7fac2cda29a14e963c469a146f18ea294f955171 (diff)
usbh device descriptor validation, also check ep size > 0
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_private.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/tusb_private.h b/src/common/tusb_private.h
index 5a51dfc37..17ab267c3 100644
--- a/src/common/tusb_private.h
+++ b/src/common/tusb_private.h
@@ -81,9 +81,8 @@ typedef struct {
bool tu_edpt_validate(const tusb_desc_endpoint_t *desc_ep, tusb_speed_t speed);
#else
TU_ATTR_ALWAYS_INLINE static inline bool tu_edpt_validate(const tusb_desc_endpoint_t *desc_ep, tusb_speed_t speed) {
- (void)desc_ep;
(void)speed;
- return true;
+ return tu_edpt_packet_size(desc_ep) > 0;
}
#endif