projects
/
usbmuxd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00335c0
)
Fix possible buffer overflow (thanks Rigan)
nikias
author
Nikias Bassen
<nikias@gmx.li>
Thu, 12 Jan 2012 02:03:29 +0000
(
03:03
+0100)
committer
Nikias Bassen
<nikias@gmx.li>
Thu, 12 Jan 2012 02:03:29 +0000
(
03:03
+0100)
libusbmuxd/libusbmuxd.c
patch
|
blob
|
history
diff --git
a/libusbmuxd/libusbmuxd.c
b/libusbmuxd/libusbmuxd.c
index
e06ee61
..
98e92df
100644
(file)
--- a/
libusbmuxd/libusbmuxd.c
+++ b/
libusbmuxd/libusbmuxd.c
@@
-189,7
+189,7
@@
static int receive_packet(int sfd, struct usbmuxd_header *header, void **payload
char *strval = NULL;
plist_get_string_val(n, &strval);
if (strval) {
- str
cpy(dev->serial_number, strval
);
+ str
ncpy(dev->serial_number, strval, 255
);
free(strval);
}
n = plist_dict_get_item(props, "LocationID");