summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/jffs2/src/os-rtems.h
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-07-24 10:46:58 +0800
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-06-20 13:25:32 +0200
commit9d9bfe594814dbd5ff133779d3cf8dcb1c237186 (patch)
tree48897860c84bbf28345c428df63303b8bd89d555 /cpukit/libfs/src/jffs2/src/os-rtems.h
parentjffs2: Remove C++ style comments from uapi header (diff)
downloadrtems-9d9bfe594814dbd5ff133779d3cf8dcb1c237186.tar.bz2
jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()
In jffs2_add_frag_to_fragtree(), there is an if statement on line 223 to check whether "this" is NULL: if (this) When "this" is NULL, it is used at several places, such as on line 249: if (this->node) and on line 260: if (newfrag->ofs > this->ofs) Thus possible null-pointer dereferences may occur. To fix these bugs, -EINVAL is returned when "this" is NULL. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions