Page MenuHomeFreeBSD

D53945.1794466962.diff
No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None

D53945.1794466962.diff

diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
--- a/lib/libc/gen/getgrent.c
+++ b/lib/libc/gen/getgrent.c
@@ -347,16 +347,16 @@
memcpy(&p, buffer + sizeof(struct group), sizeof(char *));
if (orig_buf_size + sizeof(struct group) + sizeof(char *) +
- _ALIGN(p) - (size_t)p < buffer_size) {
+ ((char *)_ALIGN(p) - p) < buffer_size) {
*ret_errno = ERANGE;
return (NS_RETURN);
}
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct group) + sizeof(char *) +
- _ALIGN(p) - (size_t)p,
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct group) - sizeof(char *) -
- _ALIGN(p) + (size_t)p);
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(grp->gr_name, orig_buf, p, char *);
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c
--- a/lib/libc/net/gethostnamadr.c
+++ b/lib/libc/net/gethostnamadr.c
@@ -402,9 +402,9 @@
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct hostent) + sizeof(char *) +
- _ALIGN(p) - (size_t)p,
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct hostent) - sizeof(char *) -
- _ALIGN(p) + (size_t)p);
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(ht->h_name, orig_buf, p, char *);
diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c
--- a/lib/libc/net/getnetnamadr.c
+++ b/lib/libc/net/getnetnamadr.c
@@ -249,9 +249,9 @@
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct netent) + sizeof(char *) +
- _ALIGN(p) - (size_t)p,
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct netent) - sizeof(char *) -
- _ALIGN(p) + (size_t)p);
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(ne->n_name, orig_buf, p, char *);
diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c
--- a/lib/libc/net/getprotoent.c
+++ b/lib/libc/net/getprotoent.c
@@ -265,9 +265,9 @@
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct protoent) + sizeof(char *) +
- _ALIGN(p) - (size_t)p,
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct protoent) - sizeof(char *) -
- _ALIGN(p) + (size_t)p);
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(proto->p_name, orig_buf, p, char *);
diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c
--- a/lib/libc/net/getservent.c
+++ b/lib/libc/net/getservent.c
@@ -1084,9 +1084,9 @@
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct servent) + sizeof(char *) +
- (_ALIGN(p) - (size_t)p),
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct servent) - sizeof(char *) -
- (_ALIGN(p) - (size_t)p));
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(serv->s_name, orig_buf, p, char *);
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
--- a/lib/libc/rpc/getrpcent.c
+++ b/lib/libc/rpc/getrpcent.c
@@ -778,9 +778,9 @@
orig_buf = (char *)_ALIGN(orig_buf);
memcpy(orig_buf, buffer + sizeof(struct rpcent) + sizeof(char *) +
- _ALIGN(p) - (size_t)p,
+ ((char *)_ALIGN(p) - p),
buffer_size - sizeof(struct rpcent) - sizeof(char *) -
- _ALIGN(p) + (size_t)p);
+ ((char *)_ALIGN(p) - p));
p = (char *)_ALIGN(p);
NS_APPLY_OFFSET(rpc->r_name, orig_buf, p, char *);

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 7:02 AM (16 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41672831
Default Alt Text
D53945.1794466962.diff (3 KB)

Event Timeline