mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
synced 2026-05-05 11:08:01 +02:00
Fix off-by-one in length check
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
68cf24822c
commit
6d84293699
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ const char *xcb_errors_get_name_for_minor_code(xcb_errors_context_t *ctx,
|
|||
while (info && info->major_opcode != major_code)
|
||||
info = info->next;
|
||||
|
||||
if (info == NULL || minor_code > info->static_info.num_minor)
|
||||
if (info == NULL || minor_code >= info->static_info.num_minor)
|
||||
return NULL;
|
||||
|
||||
return get_strings_entry(info->static_info.strings_minor, minor_code);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue