From: Ian Abbott Date: Fri, 7 Sep 2007 17:04:27 +0000 (+0000) Subject: Corrected calculation of board name offset. Fixes segmentation violation X-Git-Tag: r0_7_75~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=40f926d385334e968e5006f66e44b65dc8245e01;p=comedi.git Corrected calculation of board name offset. Fixes segmentation violation when reading /proc/comedi for comedi drivers that have num_names > 1. --- 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);