1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Properly check for empty xml node set to avoid NULL pointer dereference.

This bug was source of g-s-d crashes on X systems with non standard
keyboard layout options.
This commit is contained in:
Alexander Nedotsukov 2007-03-25 07:33:11 +00:00
parent 2345d03e02
commit c8d5ff0b51
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188242
2 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,7 @@
PORTNAME= libxklavier
PORTVERSION= 3.2
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}

View File

@ -0,0 +1,11 @@
--- libxklavier/xklavier_config.c.orig Sun Mar 25 16:03:37 2007
+++ libxklavier/xklavier_config.c Sun Mar 25 16:25:08 2007
@@ -280,7 +280,7 @@
return FALSE;
nodes = xpath_obj->nodesetval;
- if (nodes != NULL && nodes->nodeTab != NULL) {
+ if (nodes != NULL && nodes->nodeNr) {
rv = xkl_read_config_item(config, *nodes->nodeTab, pitem);
if (pnode != NULL) {
*pnode = *nodes->nodeTab;