Toby Gray wrote: > Hi, > > I've been investigating a STATUS_STACK_BUFFER_OVERRUN (0xc0000409) > exception when running the latest libusbx in Windows XP. I believe it's > due to a bug in how the fake USB descriptors for HID devices are > created. The location of the second endpoint was being calculated > incorrectly in _hid_get_config_descriptor. > > I've attached a fix for it. The only thing I'm not entirely happy with > about the fix is the use of ed2 as a variable name, feel free to suggest > a better alternative.
Do we need the additional pointer at all? It seems like it violates 3rd Normal Form. Why not just advance the pointer in place? ed = (struct libusb_endpoint_descriptor *)((unsigned char *)ed + LIBUSB_DT_ENDPOINT_SIZE); -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel