diff options
author | Andreas Wettstein <wettstein509@solnet.ch> | 2014-02-15 17:35:50 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2016-01-01 18:39:06 -0800 |
commit | 56fa447282c47bf23d05e18a42bbd0184dbd8302 (patch) | |
tree | 1868f892a275d1a96ef4520be0f461160df2ec99 /src/xkbtext.c | |
parent | a594dde52b7903feab839f5cfe08755753aca20e (diff) |
Fix mistyped argument of sizeof
A pointer rather than the buffer was given to sizeof. As the data to be
written is only one or two bytes, a pointer size is at least four bytes, and
the buffer has 32 bytes, this error did not have negative effects.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/xkbtext.c')
-rw-r--r-- | src/xkbtext.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xkbtext.c b/src/xkbtext.c index c8b8276..013cdef 100644 --- a/src/xkbtext.c +++ b/src/xkbtext.c @@ -920,11 +920,11 @@ CopyGroupActionArgs(Display *dpy, XkbDescPtr xkb, XkbAction *action, act = &action->group; TryCopyStr(buf, "group=", sz); if (act->flags & XkbSA_GroupAbsolute) - snprintf(tbuf, sizeof(buf), "%d", XkbSAGroup(act) + 1); + snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act) + 1); else if (XkbSAGroup(act) < 0) - snprintf(tbuf, sizeof(buf), "%d", XkbSAGroup(act)); + snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act)); else - snprintf(tbuf, sizeof(buf), "+%d", XkbSAGroup(act)); + snprintf(tbuf, sizeof(tbuf), "+%d", XkbSAGroup(act)); TryCopyStr(buf, tbuf, sz); if (act->type == XkbSA_LockGroup) return True; |