unicorn/qemu/include
liujunjie ea6ea4313d
qstring: Fix qstring_from_substr() not to provoke int overflow
qstring_from_substr() parameters @start and @end are of type int.
blkdebug_parse_filename(), blkverify_parse_filename(), nbd_parse_uri(),
and qstring_from_str() pass @end values of type size_t or ptrdiff_t.
Values exceeding INT_MAX get truncated, with possibly disastrous
results.

Such huge substrings seem unlikely, but we found one in a core dump,
where "info tlb" executed via QMP's human-monitor-command apparently
produced 35 GiB of output.

Fix by changing the parameters size_t.

Backports commit ad63c549ecd4af4a22a675a815edeb06b0e7bb6e from qemu
2018-08-02 21:21:51 -04:00
..
crypto
exec tcg: Define and use new tlb_hit() and tlb_hit_page() functions 2018-07-03 19:21:36 -04:00
fpu fpu/softfloat: Specialize on snan_bit_is_one 2018-05-19 23:38:58 -04:00
hw Use cpu_create(type) instead of cpu_init(cpu_model) 2018-03-20 14:20:30 -04:00
qapi qstring: Fix qstring_from_substr() not to provoke int overflow 2018-08-02 21:21:51 -04:00
qemu include: Add IEC binary prefixes in qemu/units.h 2018-07-03 19:47:19 -04:00
qom cpu: Assert asidx_from_attrs return value in range 2018-07-03 19:43:59 -04:00
sysemu
config.h
elf.h include/elf: Update elf.h to commit f71a8eaffba3271cf7cdad95572f6996f7523a5b 2018-03-11 15:34:35 -04:00
glib_compat.h Use cpu_create(type) instead of cpu_init(cpu_model) 2018-03-20 14:20:30 -04:00
qemu-common.h