Page MenuHomeFreeBSD

D37036.diff
No OneTemporary

D37036.diff

diff --git a/lib/libc/gen/auxv.c b/lib/libc/gen/auxv.c
--- a/lib/libc/gen/auxv.c
+++ b/lib/libc/gen/auxv.c
@@ -381,15 +381,21 @@
break;
case AT_USRSTACKBASE:
if (buflen == sizeof(u_long)) {
- *(u_long *)buf = usrstackbase;
- res = 0;
+ if (usrstackbase != 0) {
+ *(u_long *)buf = usrstackbase;
+ res = 0;
+ } else
+ res = ENOENT;
} else
res = EINVAL;
break;
case AT_USRSTACKLIM:
if (buflen == sizeof(u_long)) {
- *(u_long *)buf = usrstacklim;
- res = 0;
+ if (usrstacklim != 0) {
+ *(u_long *)buf = usrstacklim;
+ res = 0;
+ } else
+ res = ENOENT;
} else
res = EINVAL;
break;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 1:31 PM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14561086
Default Alt Text
D37036.diff (644 B)

Event Timeline