Date: Tue, 9 Jul 2002 21:42:06 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 14011 for review Message-ID: <200207100442.g6A4g6X7062340@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14011 Change 14011 by rwatson@rwatson_paprika on 2002/07/09 21:41:42 If a tree entry doesn't have a type string, don't dereference the string. This prevents the application from segfaulting if you double click a node in the sysctl tree that is not a leaf node. Affected files ... .. //depot/projects/trustedbsd/misc/kmacmanager/sysctllist.cc#4 edit Differences ... ==== //depot/projects/trustedbsd/misc/kmacmanager/sysctllist.cc#4 (text+ko) ==== @@ -212,11 +212,13 @@ void SysctlList::slotDoubleClicked(QListViewItem *item) { + const char *type; char *itemname, buf[BUFSIZ]; int error, newvalue, oldvalue; bool ok = FALSE; - if (strcmp(item->text(3).latin1(), "int") == 0) { + type = item->text(3).latin1(); + if (type != NULL && strcmp(type, "int") == 0) { itemname = strdup(item->text(2).latin1()); oldvalue = atoi(item->text(1).latin1()); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207100442.g6A4g6X7062340>