From 40f926d385334e968e5006f66e44b65dc8245e01 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 7 Sep 2007 17:04:27 +0000 Subject: [PATCH] Corrected calculation of board name offset. Fixes segmentation violation when reading /proc/comedi for comedi drivers that have num_names > 1. --- comedi/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comedi/proc.c b/comedi/proc.c index 506d31e8..6723c32c 100644 --- a/comedi/proc.c +++ b/comedi/proc.c @@ -74,7 +74,7 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi l += sprintf(buf+l,"%s:\n",driv->driver_name); for(i=0;inum_names;i++){ l+=sprintf(buf+l," %s\n", - *(char **)(driv->board_name+i*driv->offset)); + *(char **)((char *)driv->board_name+i*driv->offset)); } if(!driv->num_names){ l+=sprintf(buf+l," %s\n",driv->driver_name); -- 2.26.2