mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
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
This commit is contained in:
parent
8ccaebee97
commit
deb4736ca2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=158743
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= libxklavier
|
||||
PORTVERSION= 2.2
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
|
13
x11/libxklavier/files/patch-libxklavier_xklavier_props.c
Normal file
13
x11/libxklavier/files/patch-libxklavier_xklavier_props.c
Normal file
@ -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';*/
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user