qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] libvduse: Replace strcpy() with strncpy()


From: Markus Armbruster
Subject: Re: [PATCH 2/4] libvduse: Replace strcpy() with strncpy()
Date: Wed, 29 Jun 2022 11:38:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Xie Yongji <xieyongji@bytedance.com> writes:

> Coverity reported a string overflow issue since we copied
> "name" to "dev_config->name" without checking the length.
> This should be a false positive since we already checked
> the length of "name" in vduse_name_is_invalid(). But anyway,
> let's replace strcpy() with strncpy() to fix the coverity
> complaint.

Mention why you can't use something nicer from GLib?

> Fixes: Coverity CID 1490224
> Signed-off-by: Xie Yongji <xieyongji@bytedance.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]