summary refs log tree commit diff stats
path: root/scripts/modules/module_block.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-05-14 20:03:08 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-05-22 15:00:04 +0200
commit046aba169bc21c08823cfbe8d4f3b4ad116ac676 (patch)
tree6bd2f82bad17e551ec649f801859324225cc37e2 /scripts/modules/module_block.py
parentd18dc3af478664b1d5e0dd3ace1eabb9d160f244 (diff)
downloadfocaccia-qemu-046aba169bc21c08823cfbe8d4f3b4ad116ac676.tar.gz
focaccia-qemu-046aba169bc21c08823cfbe8d4f3b4ad116ac676.zip
gdbstub: Reject invalid RLE repeat counts
"Debugging with GDB / Appendix E GDB Remote Serial Protocol /
Overview" specifies "The printable characters '#' and '$' or with a
numeric value greater than 126 must not be used."  gdb_read_byte()
only rejects values < 32.  This is wrong.  Impact depends on the caller:

* gdb_handlesig() passes a char.  Incorrectly accepts '#', '$' and
  '\127'.

* gdb_chr_receive() passes an uint8_t.  Additionally accepts
  characters with the most-significant bit set.

Correct the validity check to match the specification.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190514180311.16028-4-armbru@redhat.com>
Diffstat (limited to 'scripts/modules/module_block.py')
0 files changed, 0 insertions, 0 deletions