*
********************************************************/
+#include "config.h"
+
#include "keymap.h"
#include "text.h"
{ "AnyOf", MATCH_ANY },
{ "AllOf", MATCH_ALL },
{ "Exactly", MATCH_EXACTLY },
+ { NULL, 0 },
};
const char *
pos += ret;
}
- return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
+ return strncpy(xkb_context_get_buffer(ctx, pos + 1), buf, pos + 1);
}
const char *
LedStateMaskText(struct xkb_context *ctx, enum xkb_state_component mask)
{
- char buf[1024];
+ char buf[1024] = {0};
size_t pos = 0;
if (mask == 0)
pos += ret;
}
- return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
+ return strncpy(xkb_context_get_buffer(ctx, pos + 1), buf, pos + 1);
}
const char *
ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask)
{
- char buf[1024];
+ char buf[1024] = {0};
size_t pos = 0;
if (mask == 0)
pos += ret;
}
- return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
+ return strncpy(xkb_context_get_buffer(ctx, pos + 1), buf, pos + 1);
}