diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-02-10 22:44:43 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-02-13 09:12:37 -0800 |
commit | fce78beab4b5f7ee99bf66d35c36b7ed12871d5a (patch) | |
tree | 248c0cc1375611ce46de88e0ff50177d0a93adbf /setxkbmap.c | |
parent | 2011f509c56b73cc62105c689d702f279f522017 (diff) |
Bug 34151: Potential bug and buffer overflow due to misused rules filename
https://bugs.freedesktop.org/show_bug.cgi?id=34151
Use rfName consistently, instead of sometimes reverting to svValue[RULES_NDX]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Diffstat (limited to 'setxkbmap.c')
-rw-r--r-- | setxkbmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/setxkbmap.c b/setxkbmap.c index 4c30812..1590fdd 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -850,13 +850,13 @@ applyRules(void) inclPath[i], rfName); continue; } - sprintf(buf, "%s/rules/%s", inclPath[i], svValue[RULES_NDX]); + sprintf(buf, "%s/rules/%s", inclPath[i], rfName); rules = XkbRF_Load(buf, svValue[LOCALE_NDX], True, True); } } if (!rules) { - ERR1("Couldn't find rules file (%s) \n", svValue[RULES_NDX]); + ERR1("Couldn't find rules file (%s) \n", rfName); return False; } /* Let the rules file to the magic, then update the svValues with @@ -894,7 +894,7 @@ applyRules(void) } if (verbose > 6) { - MSG1("Applied rules from %s:\n", svValue[RULES_NDX]); + MSG1("Applied rules from %s:\n", rfName); dumpNames(True, False); } } |