On Wed, Jul 30, 2025 at 09:27:09AM +0200, Thomas Huth wrote:
> From: Thomas Huth <[email protected]>
> 
> When compiling QEMU with --enable-ubsan there is a undefined behavior
> warning when running "make check":
> 
>  .../qga/commands-linux.c:452:15: runtime error: applying non-zero offset 5 
> to null pointer
>  #0 0x55ea7b89450c in build_guest_fsinfo_for_pci_dev 
> ..../qga/commands-linux.c:452:15
> 
> Fix it by avoiding the additional pointer variable here and use an
> "offset" integer variable instead.
> 
> Signed-off-by: Thomas Huth <[email protected]>
> ---
>  v2: Use an integer offset variable instead for checking for a NULL pointer
> 
>  qga/commands-linux.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to