[PATCH 0/5] Clean up various places using strcpy()

Peter Krempa posted 5 patches 3 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1614768104.git.pkrempa@redhat.com
src/remote/remote_daemon_dispatch.c |  9 +++------
src/util/virhostcpu.c               |  6 +++---
src/util/virutil.c                  | 29 +++++++----------------------
src/util/virutil.h                  |  2 +-
src/vmx/vmx.c                       | 12 ------------
src/vz/vz_sdk.c                     |  3 ---
tests/commandhelper.c               |  7 ++++---
7 files changed, 18 insertions(+), 50 deletions(-)
[PATCH 0/5] Clean up various places using strcpy()
Posted by Peter Krempa 3 years, 2 months ago
This series +
https://listman.redhat.com/archives/libvir-list/2021-March/msg00081.html

removes use of strcpy().

Peter Krempa (5):
  virIndexToDiskName: Make 'idx' unsigned and remove check
  virIndexToDiskName: Use g_string_prepend(_c) to improve readability
  remote_daemon_dispatch: Replace g_new + strcpy with g_strdup
  virHostCPUGetStatsLinux: Avoid 'strcpy'
  commandhelper: printCwd: Print result directly instead of copying it

 src/remote/remote_daemon_dispatch.c |  9 +++------
 src/util/virhostcpu.c               |  6 +++---
 src/util/virutil.c                  | 29 +++++++----------------------
 src/util/virutil.h                  |  2 +-
 src/vmx/vmx.c                       | 12 ------------
 src/vz/vz_sdk.c                     |  3 ---
 tests/commandhelper.c               |  7 ++++---
 7 files changed, 18 insertions(+), 50 deletions(-)

-- 
2.29.2

Re: [PATCH 0/5] Clean up various places using strcpy()
Posted by Michal Privoznik 3 years, 2 months ago
On 3/3/21 11:45 AM, Peter Krempa wrote:
> This series +
> https://listman.redhat.com/archives/libvir-list/2021-March/msg00081.html
> 
> removes use of strcpy().
> 
> Peter Krempa (5):
>    virIndexToDiskName: Make 'idx' unsigned and remove check
>    virIndexToDiskName: Use g_string_prepend(_c) to improve readability
>    remote_daemon_dispatch: Replace g_new + strcpy with g_strdup
>    virHostCPUGetStatsLinux: Avoid 'strcpy'
>    commandhelper: printCwd: Print result directly instead of copying it
> 
>   src/remote/remote_daemon_dispatch.c |  9 +++------
>   src/util/virhostcpu.c               |  6 +++---
>   src/util/virutil.c                  | 29 +++++++----------------------
>   src/util/virutil.h                  |  2 +-
>   src/vmx/vmx.c                       | 12 ------------
>   src/vz/vz_sdk.c                     |  3 ---
>   tests/commandhelper.c               |  7 ++++---
>   7 files changed, 18 insertions(+), 50 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal