chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tmpfiles: avoid out of bounds read
[elogind.git]
/
src
/
tmpfiles
/
tmpfiles.c
diff --git
a/src/tmpfiles/tmpfiles.c
b/src/tmpfiles/tmpfiles.c
index 25c8cfa6946e6bfe62c7394289ab1a2b2ec5e8ae..55a6a7bb54505528744983251d80ae5af7e8f71e 100644
(file)
--- a/
src/tmpfiles/tmpfiles.c
+++ b/
src/tmpfiles/tmpfiles.c
@@
-830,7
+830,7
@@
static int get_attrib_from_arg(Item *item) {
return -EINVAL;
}
for (; *p ; p++) {
return -EINVAL;
}
for (; *p ; p++) {
- if ((uint8_t)*p > ELEMENTSOF(attributes) || attributes[(uint8_t)*p] == 0) {
+ if ((uint8_t)*p >
=
ELEMENTSOF(attributes) || attributes[(uint8_t)*p] == 0) {
log_error("\"%s\": setting ATTR: unknown attr '%c'", item->path, *p);
return -EINVAL;
}
log_error("\"%s\": setting ATTR: unknown attr '%c'", item->path, *p);
return -EINVAL;
}