summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-01-25 10:43:38 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-01-25 10:43:38 +0000
commit013c343abd196c0fc0d6f2ed19ff861b484a5beb (patch)
treecf978290d33280771b513d89aa9ab1c1d4acab1d
parent8191713f710e01ad30024c029808ef5d4dc25113 (diff)
__errno() returns a 32-bit pointer, so make sure we write a 32-bit
value to and not overwrite other bits by writing a 64-bit value.
-rw-r--r--lib/libc/arch/aarch64/sys/cerror.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/aarch64/sys/cerror.S b/lib/libc/arch/aarch64/sys/cerror.S
index 68edada6834..782f73ee06a 100644
--- a/lib/libc/arch/aarch64/sys/cerror.S
+++ b/lib/libc/arch/aarch64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.1 2017/01/11 18:09:24 patrick Exp $ */
+/* $OpenBSD: cerror.S,v 1.2 2017/01/25 10:43:37 patrick Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@ -32,7 +32,7 @@ _ENTRY(CERROR)
stp x0, x30, [sp,#-16]!
bl _C_LABEL(__errno)
ldp x1, x30, [sp],#16
- str x1, [x0]
+ str w1, [x0]
movn x0, #0
movn x1, #0
ret