--- a/usr/src/lib/libusb/common/wr_libusb.c Thu Jan 06 02:11:29 2011 -0800
+++ b/usr/src/lib/libusb/common/wr_libusb.c Sat Jan 15 11:18:46 2011 -0800
@@ -19,11 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "@(#)wr_libusb.c 1.5 09/03/24 SMI"
+#pragma ident "@(#)wr_libusb.c 1.6 10/12/20 SMI"
#include <stdlib.h>
#include <stdio.h>
@@ -735,6 +734,7 @@
char *func = "usb_init";
char *version;
char version_store[MAX_VERSION_LEN + 1];
+ char wr_version_store[sizeof (LIBUSB_WRAPPER_VERSION)];
char *token;
char *wr_token;
char *debug_str;
@@ -834,7 +834,10 @@
(void) strncpy(version_store, version,
MAX_VERSION_LEN);
token = strtok(version_store, ".");
- wr_token = strtok(LIBUSB_WRAPPER_VERSION, ".");
+ (void) strncpy(wr_version_store,
+ LIBUSB_WRAPPER_VERSION,
+ sizeof (wr_version_store));
+ wr_token = strtok(wr_version_store, ".");
/*
* Initial wrapper version is 1.1