commit 8bfea5ae224b767047a7b76846faf59177bc0767
parent b64b148ce122ac4b8ec87ed028ed231df41b0c0a
Author: sin <sin@2f30.org>
Date: Sat, 7 Mar 2015 18:35:08 +0000
Group lengths are uint32_t not int32_t
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/req.c b/req.c
@@ -102,7 +102,7 @@ replygr(int clifd, struct group *gr)
{
struct nscdgrp header;
char *buf;
- int32_t *grlens;
+ uint32_t *grlens;
size_t memsize = 0, i, len, offset;
ssize_t n;
@@ -135,7 +135,7 @@ replygr(int clifd, struct group *gr)
memcpy(buf, &header, sizeof(header));
offset = sizeof(header);
- grlens = (int32_t *)&buf[offset];
+ grlens = (uint32_t *)&buf[offset];
for (i = 0; i < header.memcnt; i++)
grlens[i] = strlen(gr->gr_mem[i]) + 1;
offset += header.memcnt * 4;