diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-05-14 15:53:18 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-15 08:24:21 -0400 |
commit | de2a06183ebea42e27431d5dd94e108ac56e7436 (patch) | |
tree | 63da87767e131fc2f364059fbe9dc84ad1a026b4 /src | |
parent | f39b4b2fd57c0ea4cf2f90b511f2cbce37723ef0 (diff) | |
download | sssd-de2a06183ebea42e27431d5dd94e108ac56e7436.tar.gz sssd-de2a06183ebea42e27431d5dd94e108ac56e7436.tar.xz sssd-de2a06183ebea42e27431d5dd94e108ac56e7436.zip |
NSS: keep a pointer to body after body is reallocated
Diffstat (limited to 'src')
-rw-r--r-- | src/responder/nss/nsssrv_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index f36a9a322..43e82ae3a 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -1919,6 +1919,9 @@ static int fill_grent(struct sss_packet *packet, num++; if (gr_mmap_cache) { + /* body was reallocated, so fullname might be pointing to + * where body used to be, not where it is */ + to_sized_string(&fullname, (const char *)&body[rzero+STRS_ROFFSET]); ret = sss_mmap_cache_gr_store(nctx->grp_mc_ctx, &fullname, &pwfield, gid, memnum, (char *)&body[rzero] + STRS_ROFFSET + |