diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-02 00:33:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-02 00:33:44 +0100 |
commit | 2aab906790a3d73b791cb3f2af91fe41ad641994 (patch) | |
tree | 81a068c167e01c69712bb0d0563dc0afe78acff4 /auth | |
parent | 4f523e2b5004a0ae6e01d83b64b9f093a371848a (diff) | |
download | hurd-2aab906790a3d73b791cb3f2af91fe41ad641994.tar.gz hurd-2aab906790a3d73b791cb3f2af91fe41ad641994.tar.bz2 hurd-2aab906790a3d73b791cb3f2af91fe41ad641994.zip |
Avoid passing NULL to memcpy
Diffstat (limited to 'auth')
-rw-r--r-- | auth/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/auth.c b/auth/auth.c index 29c9fd8d..925f790f 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -83,7 +83,7 @@ idvec_copyout (struct idvec *idvec, uid_t **ids, size_t *nids) { if (idvec->num > *nids) *ids = idvec->ids; - else + else if (idvec->num) memcpy (*ids, idvec->ids, idvec->num * sizeof *ids); *nids = idvec->num; } |