summaryrefslogtreecommitdiffstats
path: root/libusbmuxd
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-01-12 17:58:26 +0100
committerGravatar Nikias Bassen2012-01-12 17:58:26 +0100
commit8968476bb5262d8aef20cb199337b174d338beb8 (patch)
treeee0c81d3dd8e369ece99c22c0be9f42422a63656 /libusbmuxd
parent00335c0197c3e130d7002ebab2a808a9433b3233 (diff)
downloadusbmuxd-8968476bb5262d8aef20cb199337b174d338beb8.tar.gz
usbmuxd-8968476bb5262d8aef20cb199337b174d338beb8.tar.bz2
Fix possible buffer overflow (thanks Rigan)
Diffstat (limited to 'libusbmuxd')
-rw-r--r--libusbmuxd/libusbmuxd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c
index e06ee61..98e92df 100644
--- 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) {
- strcpy(dev->serial_number, strval);
+ strncpy(dev->serial_number, strval, 255);
free(strval);
}
n = plist_dict_get_item(props, "LocationID");