projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5de878d
)
src/hw/maru_touchscreen.c: fix wrong buffer size to memset
author
Igor Mitsyanko
<i.mitsyanko@samsung.com>
Wed, 1 Aug 2012 08:56:56 +0000
(12:56 +0400)
committer
Evgeny Voevodin
<e.voevodin@samsung.com>
Tue, 18 Sep 2012 06:20:24 +0000
(10:20 +0400)
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>
tizen/src/hw/maru_usb_touchscreen.c
patch
|
blob
|
history
diff --git
a/tizen/src/hw/maru_usb_touchscreen.c
b/tizen/src/hw/maru_usb_touchscreen.c
index a2c55ea051a0b0a0fbff6fb4e92c4bc4f004590d..2d3593fb1044cd0416afd9d1118d4dde5bce8a60 100644
(file)
--- 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;