(cache_addserv): Correctly compute size of fixed-size portion of the record.
authordrepper <drepper>
Thu, 12 Jun 2008 16:04:37 +0000 (16:04 +0000)
committerdrepper <drepper>
Thu, 12 Jun 2008 16:04:37 +0000 (16:04 +0000)
nscd/servicescache.c

index c952fa1..44f12a3 100644 (file)
@@ -173,7 +173,7 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
          total += s_aliases_len[cnt];
        }
 
-      total += (sizeof (struct dataset)
+      total += (offsetof (struct dataset, strdata)
                + s_name_len
                + s_proto_len
                + s_aliases_cnt * sizeof (uint32_t));