projects
/
platform
/
kernel
/
opensbi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ce486a
)
lib: sbi: Fix sbi_strnlen wrong count decrement
author
Rahul Pathak
<rpathak@ventanamicro.com>
Tue, 13 Sep 2022 09:47:08 +0000
(15:17 +0530)
committer
Anup Patel
<anup@brainfault.org>
Tue, 13 Sep 2022 11:47:10 +0000
(17:17 +0530)
count(maxlen) should not be decremented here
Fixes:
1901e8a287bc
("platform: Add minimal libc support.")
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_string.c
patch
|
blob
|
history
diff --git
a/lib/sbi/sbi_string.c
b/lib/sbi/sbi_string.c
index
c163f31
..
9ebea69
100644
(file)
--- a/
lib/sbi/sbi_string.c
+++ b/
lib/sbi/sbi_string.c
@@
-59,7
+59,6
@@
size_t sbi_strnlen(const char *str, size_t count)
while (*str != '\0' && ret < count) {
ret++;
str++;
- count--;
}
return ret;