|
From: Alain P. <apa...@us...> - 2002-05-15 13:06:19
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_linkkey_common.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
The accompanying log:
Added some sanity check on linkkey and bd address.
The diff of the modified file(s):
--- bt_linkkey_common.c 2 Apr 2002 13:44:50 -0000 1.1
+++ bt_linkkey_common.c 15 May 2002 13:06:18 -0000 1.2
@@ -104,6 +104,12 @@
/* Separate the line in two parts */
linkkey_tmp =3D str_to_parse;
bd_addr_tmp =3D strsep ((char **) &linkkey_tmp, " ");
+
+ /* check if the two tokens are valid. If not, end the processing */
+ if ((linkkey_tmp =3D=3D NULL) || (bd_addr_tmp =3D=3D NULL)) {
+ return 1;
+ }
+=20=20
DLINKKEY("linkkey : %s\n", linkkey_tmp);
DLINKKEY("bd_addr : %s\n", bd_addr_tmp);
=20=20=20
|