Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (43m)  netbsd-10 (4d)  netbsd-9 (4d)  netbsd-8 (9d) 

2024-05-20 16:47:56 UTC Now

2017-12-08 14:46:18 UTC MAIN commitmail json YAML

Be more defensive towards malicious USB devices

This avoids potential panics due to 0-sized memory allocation attempts,
which could be triggered by malicious USB devices.

Tested on NetBSD/amd64 with a Sony Xperia X (SailfishOS).

Based on an initial patch by Nick Hudson <skrll@NetBSD.org>, thanks!

Fixes PR kern/52383.

XXX pull-up to netbsd-7, netbsd-8

LGTM xtos@

(khorben)