diff options
author | Tom Tromey <tromey@adacore.com> | 2024-09-09 11:29:12 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-03-06 14:17:17 -0700 |
commit | 56ddbf72843c0fa1badd68e71c5ba076f626c5c5 (patch) | |
tree | 3a032dc23e8252fe4e9e5bdcd2d51a516cc75d09 /gdb/cli/cli-utils.h | |
parent | 29faeceaa8a7833c1234f9980266c84c7c6b9d02 (diff) | |
download | binutils-56ddbf72843c0fa1badd68e71c5ba076f626c5c5.zip binutils-56ddbf72843c0fa1badd68e71c5ba076f626c5c5.tar.gz binutils-56ddbf72843c0fa1badd68e71c5ba076f626c5c5.tar.bz2 |
Fix latent crash in ada_variant_discrim_name
ada_variant_discrim_name does this:
for (discrim_end = name + strlen (name) - 6; discrim_end != name;
If NAME is too short, this will construct an invalid pointer, perhaps
causing a crash.
This patch arranges to check the length first.
Diffstat (limited to 'gdb/cli/cli-utils.h')
0 files changed, 0 insertions, 0 deletions