Skip to content

Commit

Permalink
Keep from segfault if XMODIFIERS is not in the format of "@im=blah"
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetralet committed Jan 5, 2012
1 parent 6e07203 commit f87f048
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hime-conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ char *get_hime_xim_name()
static char sstr[32];
char *p = strstr(xim_name, find);

if (p==NULL) return "hime";

p += strlen(find);
strncpy(sstr, p, sizeof(sstr));
sstr[sizeof(sstr) - 1]=0;
Expand Down

0 comments on commit f87f048

Please sign in to comment.