diff options
author | Igor Mitsyanko <i.mitsyanko@samsung.com> | 2012-08-01 12:56:56 +0400 |
---|---|---|
committer | Evgeny Voevodin <e.voevodin@samsung.com> | 2012-09-18 10:20:24 +0400 |
commit | 108045dc8cafe01dbe78c94df143ffdc892b2857 (patch) | |
tree | bd39cc4b4a6ff3b0c6f5839068af382481a90bd0 | |
parent | 5de878d91984ba9b0f41e1e64b4b57bfa0a9db6f (diff) | |
download | qemu-108045dc8cafe01dbe78c94df143ffdc892b2857.tar.gz qemu-108045dc8cafe01dbe78c94df143ffdc892b2857.tar.bz2 qemu-108045dc8cafe01dbe78c94df143ffdc892b2857.zip |
src/hw/maru_touchscreen.c: fix wrong buffer size to memset
To clear buffer usb_touchscreen_handle_data() function called a memset function
with length longer then actual length of buffer, it resulted in USB packet corruption.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
-rw-r--r-- | tizen/src/hw/maru_usb_touchscreen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tizen/src/hw/maru_usb_touchscreen.c b/tizen/src/hw/maru_usb_touchscreen.c index a2c55ea051..2d3593fb10 100644 --- a/tizen/src/hw/maru_usb_touchscreen.c +++ b/tizen/src/hw/maru_usb_touchscreen.c @@ -186,7 +186,7 @@ static int usb_touchscreen_handle_data(USBDevice *dev, USBPacket *p) pthread_mutex_unlock(&event_mutex); - memset(buf, 0, sizeof(buf) * (p->iov.size - 1)); + memset(buf, 0, sizeof(buf)); ret = usb_touchscreen_poll(s, buf, p->iov.size); //write event to packet usb_packet_copy(p, buf, ret); break; |