pc-bios/s390-ccw/libc: size_t should be unsigned
Bug #1753437 reported by
dcb
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Low
|
Thomas Huth |
Bug Description
qemu/pc-
Source code is
while (num_idx >= 0) {
but
size_t num_idx = 1; /* account for NUL */
So there is no escape from the while loop.
Changed in qemu: | |
importance: | Undecided → Low |
status: | New → Confirmed |
summary: |
- qemu/pc-bios/s390-ccw/libc.c:82: bad test ? + pc-bios/s390-ccw/libc: size_t should be unsigned |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Adding qemu-s390x.
On 03/05/2018 11:31 AM, dcb wrote: bios/s390- ccw/libc. c:82]: (style) Unsigned variable 'num_idx'
> Public bug reported:
>
> qemu/pc-
> can't be negative so it is unnecessary to test it.
>
> Source code is
>
>
> while (num_idx >= 0) {
>
> but
>
> size_t num_idx = 1; /* account for NUL */
>
> So there is no escape from the while loop.
>
> ** Affects: qemu
> Importance: Undecided
> Status: New
>