From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Thu, 18 Mar 2004 12:15:35 +0000 Subject: [PATCH] SEGV in libsysfs/dlist.c Message-Id: <405992E7.3070105@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------070401000200060305060902" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------070401000200060305060902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi all, Greg, libsysfs/dlist.c: _dlist_mark_move() is missing checks for empty lists and may (and indeed, does) crash when=20 called with empty dlists. Please apply. Cheers, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=DFe 5 +49 911 74053 688 90409 N=FCrnberg http://www.suse.de --------------070401000200060305060902 Content-Type: text/plain; name="libsysfs-dlist.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libsysfs-dlist.patch" ===== dlist.c 1.3 vs edited ===== --- 1.3/libsysfs/dlist.c Wed Mar 10 18:12:14 2004 +++ edited/dlist.c Thu Mar 18 13:11:00 2004 @@ -74,14 +74,14 @@ { if(direction) { - if( list->marker->next!=NULL) + if( list->marker && list->marker->next!=NULL) list->marker=list->marker->next; else return(NULL); } else { - if( list->marker->prev!=NULL) + if( list->marker && list->marker->prev!=NULL) list->marker=list->marker->prev; else return(NULL); --------------070401000200060305060902-- ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel