linux/drivers/mtd/ubi
Dan Carpenter be076fdf83 ubifs: fix snprintf() checking
The snprintf() function returns the number of characters (not
counting the NUL terminator) that it would have printed if we
had space.

This buffer has UBIFS_DFS_DIR_LEN characters plus one extra for
the terminator.  Printing UBIFS_DFS_DIR_LEN is okay but anything
higher will result in truncation.  Thus the comparison needs to be
change from == to >.

These strings are compile time constants so this patch doesn't
affect runtime.

Fixes: ae380ce047 ("UBIFS: lessen the size of debugging info data structure")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2021-06-18 22:04:47 +02:00
..
attach.c mtd: Convert fallthrough comments into statements 2020-03-30 10:14:54 +02:00
block.c ubi: block: Warn if volume size is not multiple of 512 2019-09-15 22:12:49 +02:00
build.c ubi: Fix fall-through warnings for Clang 2021-04-15 22:00:43 +02:00
cdev.c compat_ioctl: move drivers to compat_ptr_ioctl 2019-10-23 17:23:43 +02:00
debug.c ubifs: fix snprintf() checking 2021-06-18 22:04:47 +02:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
eba.c ubi: eba: Delete useless kfree code 2021-02-12 21:53:22 +01:00
fastmap-wl.c ubi: fastmap: Free fastmap next anchor peb during detach 2020-08-02 23:56:13 +02:00
fastmap.c ubi: Select fastmap anchor PEBs considering wear level rules 2020-06-02 22:53:05 +02:00
gluebi.c mtd: ubi: gluebi: Fix misnamed function parameter documentation 2020-11-20 12:37:32 +01:00
io.c ubi: remove dead code in validate_vid_hdr() 2021-02-12 21:53:22 +01:00
kapi.c mtd: ubi: kapi: Correct documentation for 'ubi_leb_read_sg's 'sgl' parameter 2020-11-20 12:37:31 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ubi-media.h ubi: ubi-media.h: Replace zero-length array with flexible-array member 2020-03-30 23:02:37 +02:00
ubi.h ubi: Remove unnecessary struct declaration 2021-04-15 22:01:25 +02:00
upd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
vmt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
vtbl.c ubi: Free the normal volumes in error paths of ubi_attach_mtd_dev() 2020-01-16 23:35:59 +01:00
wl.c mtd: ubi: wl: Fix a couple of kernel-doc issues 2020-11-20 12:37:31 +01:00
wl.h ubi: Fix producing anchor PEBs 2019-11-17 22:45:57 +01:00