aboutsummaryrefslogtreecommitdiff
path: root/scripts/dtc/libfdt/fdt_ro.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/libfdt/fdt_ro.c')
-rw-r--r--scripts/dtc/libfdt/fdt_ro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c
index 02b6d687537f..067c7acff61b 100644
--- a/scripts/dtc/libfdt/fdt_ro.c
+++ b/scripts/dtc/libfdt/fdt_ro.c
@@ -164,7 +164,7 @@ int fdt_path_offset(const void *fdt, const char *path)
/* see if we have an alias */
if (*path != '/') {
- const char *q = strchr(path, '/');
+ const char *q = memchr(path, '/', end - p);
if (!q)
q = end;
@@ -184,7 +184,7 @@ int fdt_path_offset(const void *fdt, const char *path)
p++;
if (! *p)
return offset;
- q = strchr(p, '/');
+ q = memchr(p, '/', end - p);
if (! q)
q = end;