Age | Commit message (Collapse) | Author |
|
Rather than always taking the first one in the file. This is exactly the
intended use of the 'default' flag.
Note that pretty much the same code is duplicated in xkbcomp.c when
compiling a single file from the command line, but there it is
implemented correctly (look for XkbLC_Default).
https://bugs.freedesktop.org/show_bug.cgi?id=69950
Signed-off-by: Ran Benita <ran234@gmail.com>
Tested-by: Benno Schulenberg <bensberg@justemail.net>
Acked-by: Sergey Udaltsov <sergey.udaltsov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Instead of sprintf()'ing a 4 character string to a char [4] buffer,
and leaving the trailing '\0' to overwrite into the next entry,
snprintf() to a 5 character temp buffer and memcpy the 4 characters
to the right place.
Fixes parfait errors:
Error: Buffer overflow at xkbcomp-1.0.4/misc.c:393
in function 'ComputeKbdDefaults' [Standard C Library pattern matching]
In sprintf related dereference of xkb->names->keys[i].name
with index not less than '4'
Destination array size is 4 bytes, data to be written is 4 bytes
Error: Buffer overflow at xkbcomp-1.0.4/misc.c:402
in function 'ComputeKbdDefaults' [Standard C Library pattern matching]
In sprintf related dereference of xkb->names->keys[i].name
with index not less than '4'
Destination array size is 4 bytes, data to be written is 4 bytes
[This bug was found by the Parfait bug checking tool.
For more information see http://research.sun.com/projects/parfait ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Remaining warnings are due to macros that check address or vectors
on the stack and auto generated yacc code.
Compiled with default flags and also as:
% make CFLAGS=-DENTRY_TRACKING_ON -DDEBUG_ON -DASSERTIONS_ON
to ensure the "simplification" of code like:
foo.c:
<hash>define DEBUG_VAR foo_VAR
<hash>include "foo.h"
...
foo.h:
<hash>ifdef DEBUG_VAR_NOT_LOCAL
extern
<hash>endif
int DEBUG_VAR;
...
did not change the author's "intended" logic.
|
|
|
|
"Conditional jump or move depends on uninitialised value(s)"
|
|
|
|
indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|