Use safer but slower approach to copying the string.
This commit is contained in:
@@ -286,9 +286,10 @@ FUNCTION(arch_cpu_user_strlcpy):
|
|||||||
cld
|
cld
|
||||||
.L_user_strlcpy_copy_loop:
|
.L_user_strlcpy_copy_loop:
|
||||||
/* move data by bytes */
|
/* move data by bytes */
|
||||||
movsb
|
lodsb
|
||||||
cmpb $0,-1(%esi)
|
stosb
|
||||||
je .L_user_strlcpy_source_done
|
test %al,%al
|
||||||
|
jz .L_user_strlcpy_source_done
|
||||||
loop .L_user_strlcpy_copy_loop
|
loop .L_user_strlcpy_copy_loop
|
||||||
|
|
||||||
/* null terminate string */
|
/* null terminate string */
|
||||||
|
|||||||
Reference in New Issue
Block a user