On 18 May 2018 at 18:19, Peter Maydell <peter.mayd...@linaro.org> wrote: > From: Francisco Iglesias <frasse.igles...@gmail.com> > > Add a model of the generic DMA found on Xilinx ZynqMP.
> +static bool zdma_load_descriptor(XlnxZDMA *s, uint64_t addr, void *buf) > +{ > + /* ZDMA descriptors must be aligned to their own size. */ > + if (addr % sizeof(XlnxZDMADescr)) { > + qemu_log_mask(LOG_GUEST_ERROR, > + "zdma: unaligned descriptor at %" PRIx64, > + addr); > + memset(buf, 0xdeadbeef, sizeof(XlnxZDMADescr)); Another Coverity issue (CID 1391286). memset() doesn't work like this: its second argument is a byte, so passing anything larger than 255 doesn't make sense. + s->error = true; + return false; + } thanks -- PMM