diff options
author | Nikias Bassen | 2012-01-12 17:58:26 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-01-12 17:58:26 +0100 |
commit | 8968476bb5262d8aef20cb199337b174d338beb8 (patch) | |
tree | ee0c81d3dd8e369ece99c22c0be9f42422a63656 /libusbmuxd/libusbmuxd.c | |
parent | 00335c0197c3e130d7002ebab2a808a9433b3233 (diff) | |
download | usbmuxd-8968476bb5262d8aef20cb199337b174d338beb8.tar.gz usbmuxd-8968476bb5262d8aef20cb199337b174d338beb8.tar.bz2 |
Fix possible buffer overflow (thanks Rigan)
Diffstat (limited to 'libusbmuxd/libusbmuxd.c')
-rw-r--r-- | libusbmuxd/libusbmuxd.c | 2 |
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"); |