diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2010-08-03 19:14:29 +0200 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2010-08-04 13:02:36 +0200 |
commit | da2af0a771caa8f8cff9c7bfc979f0510eb0faea (patch) | |
tree | 7cd5825126d90c9ca91c35e294d8c6d0df9fa289 /arch/cris | |
parent | 2dc1c40c6e81ba406f2f6b00fe5eecb4c7cf1197 (diff) | |
download | blackbird-op-linux-da2af0a771caa8f8cff9c7bfc979f0510eb0faea.tar.gz blackbird-op-linux-da2af0a771caa8f8cff9c7bfc979f0510eb0faea.zip |
CRIS: __do_strncpy_from_user: Don't read the byte beyond the nil
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/include/arch-v32/arch/uaccess.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/cris/include/arch-v32/arch/uaccess.h b/arch/cris/include/arch-v32/arch/uaccess.h index 6b207f1b6622..3196019706cb 100644 --- a/arch/cris/include/arch-v32/arch/uaccess.h +++ b/arch/cris/include/arch-v32/arch/uaccess.h @@ -122,14 +122,14 @@ __do_strncpy_from_user(char *dst, const char *src, long count) __asm__ __volatile__ ( " move.d %3,%0\n" "5: move.b [%2+],$acr\n" - "1: beq 2f\n" + "1: beq 6f\n" " move.b $acr,[%1+]\n" " subq 1,%0\n" "2: bne 1b\n" " move.b [%2+],$acr\n" - " sub.d %3,%0\n" + "6: sub.d %3,%0\n" " neg.d %0,%0\n" "3:\n" " .section .fixup,\"ax\"\n" @@ -140,8 +140,7 @@ __do_strncpy_from_user(char *dst, const char *src, long count) /* The address for a fault at the first move is trivial. The address for a fault at the second move is that of the preceding branch insn, since the move insn is in - its delay-slot. That address is also a branch - target. Just so you don't get confused... */ + its delay-slot. Just so you don't get confused... */ " .previous\n" " .section __ex_table,\"a\"\n" " .dword 5b,4b\n" |