diff -urN utils/hcid/security.c utils-mh/hcid/security.c --- utils/hcid/security.c 2004-02-17 19:34:30.000000000 +0100 +++ utils-mh/hcid/security.c 2004-02-21 15:15:53.000000000 +0100 @@ -365,9 +365,9 @@ gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data) { - char buf[HCI_MAX_EVENT_SIZE], *ptr = buf; + unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf; struct hci_dev_info *di = (void *) data; - int len, type, dev; + int len, dev; hci_event_hdr *eh; GIOError err; @@ -385,11 +385,11 @@ return FALSE; } - type = *ptr++; - - if (type != HCI_EVENT_PKT) + if (buf[0] != HCI_EVENT_PKT) return TRUE; + ptr++; + eh = (hci_event_hdr *) ptr; ptr += HCI_EVENT_HDR_SIZE;