patch-2.0.1 linux/drivers/isdn/pcbit/drv.c
Next file: linux/drivers/isdn/pcbit/edss1.c
Previous file: linux/drivers/isdn/pcbit/capi.h
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Sat Jun 29 20:36:22 1996
- Orig file:
v2.0.0/linux/drivers/isdn/pcbit/drv.c
- Orig date:
Mon May 20 08:21:00 1996
diff -u --recursive --new-file v2.0.0/linux/drivers/isdn/pcbit/drv.c linux/drivers/isdn/pcbit/drv.c
@@ -11,6 +11,14 @@
* PCBIT-D interface with isdn4linux
*/
+/*
+ * Fixes:
+ *
+ * Nuno Grilo <l38486@alfa.ist.utl.pt>
+ * fixed msn_list NULL pointer dereference.
+ *
+ */
+
#define __NO_VERSION__
#include <linux/module.h>
@@ -109,7 +117,7 @@
dev->b2->id = 1;
- dev->qdelivery.next = 0;
+ dev->qdelivery.next = NULL;
dev->qdelivery.sync = 0;
dev->qdelivery.routine = pcbit_deliver;
dev->qdelivery.data = dev;
@@ -152,8 +160,8 @@
dev_if->channels = 2;
- dev_if->features = ISDN_FEATURE_P_EURO | ISDN_FEATURE_L3_TRANS |
- ISDN_FEATURE_L2_HDLC;
+ dev_if->features = (ISDN_FEATURE_P_EURO | ISDN_FEATURE_L3_TRANS |
+ ISDN_FEATURE_L2_HDLC | ISDN_FEATURE_L2_TRANS );
dev_if->writebuf_skb = pcbit_xmit;
dev_if->writebuf = NULL;
@@ -1051,7 +1059,8 @@
static void pcbit_set_msn(struct pcbit_dev *dev, char *list)
{
- struct msn_entry *ptr, *back;
+ struct msn_entry *ptr;
+ struct msn_entry *back = NULL;
char *cp, *sp;
int len;
@@ -1070,7 +1079,8 @@
return;
}
- for (back=dev->msn_list; back->next; back=back->next);
+ if (dev->msn_list)
+ for (back=dev->msn_list; back->next; back=back->next);
sp = list;
@@ -1128,10 +1138,3 @@
return 0;
}
-
-
-
-
-
-
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov