Merge branch 'contrib/github_pr_18829_v5.3' into 'release/v5.3'

fix(spiffs): fix off-by-one in spiffsgen.py obj name length check (GitHub PR) (v5.3)

See merge request espressif/esp-idf!50918
This commit is contained in:
Jiang Jiang Jian
2026-08-05 12:24:40 +08:00
+2 -1
View File
@@ -403,7 +403,8 @@ class SpiffsFS(object):
return self.remaining_blocks <= 0
def create_file(self, img_path, file_path): # type: (str, str) -> None
if len(img_path) > self.build_config.obj_name_len:
# obj_name_len includes NUL (CONFIG_SPIFFS_OBJ_NAME_LEN); max chars is obj_name_len - 1.
if len(img_path) > self.build_config.obj_name_len - 1:
raise RuntimeError("object name '%s' too long" % img_path)
name = img_path