diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-04-03 21:30:10 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-04-03 21:30:10 +0000 |
commit | deb4736ca259cbea7769edfdae3b69cc0f20feaf (patch) | |
tree | 289e44589033b02ba611bdec92b062ae56de90e3 /x11/libxklavier | |
parent | - Fix logging of "connect from" message (diff) |
Fix a crash that could occur if any of the keyboard layouts had variants
(e.g. jp(latin) where latin the the variant of jp). The problem was a bad
use of realloc. Thanks to jasone for explaining the problem with the existing
code.
Reported by: bland
Notes
Notes:
svn path=/head/; revision=158743
Diffstat (limited to 'x11/libxklavier')
-rw-r--r-- | x11/libxklavier/Makefile | 1 | ||||
-rw-r--r-- | x11/libxklavier/files/patch-libxklavier_xklavier_props.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/x11/libxklavier/Makefile b/x11/libxklavier/Makefile index 4f8f04719141..2b5cc7d61a67 100644 --- a/x11/libxklavier/Makefile +++ b/x11/libxklavier/Makefile @@ -7,6 +7,7 @@ PORTNAME= libxklavier PORTVERSION= 2.2 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_GNOME} diff --git a/x11/libxklavier/files/patch-libxklavier_xklavier_props.c b/x11/libxklavier/files/patch-libxklavier_xklavier_props.c new file mode 100644 index 000000000000..87dffde8985b --- /dev/null +++ b/x11/libxklavier/files/patch-libxklavier_xklavier_props.c @@ -0,0 +1,13 @@ +--- libxklavier/xklavier_props.c.orig Mon Apr 3 14:49:17 2006 ++++ libxklavier/xklavier_props.c Mon Apr 3 17:16:13 2006 +@@ -319,7 +324,9 @@ Bool XklGetNamesProp( Atom rulesAtom, + memcpy( var, varstart + 1, --varlen ); + var[varlen] = '\0'; + +- ( (char*)realloc( *theLayout, laylen + 1 ) )[laylen] = '\0'; ++ *theLayout = realloc (*theLayout, laylen + 1); ++ (*theLayout)[laylen] = '\0'; ++ /*( (char*)realloc( *theLayout, laylen + 1 ) )[laylen] = '\0';*/ + } + } + } |