Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Aug 2, 2024
1 parent 3a87868 commit 827bdf7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libcomposefs/lcfs-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,13 @@ int lcfs_node_set_payload(struct lcfs_node_s *node, const char *payload)
{
char *dup = NULL;
if (payload) {
const size_t len = strlen (payload);
size_t limit;
if (S_ISLNK (node->inode.st_mode)) {
limit = PATH_MAX;
} else if (S_ISREG (node->node.st_mode)) {
limit = LCFS_BUILD_INLINE_FILE_SIZE_LIMIT;
}
dup = strdup(payload);
if (dup == NULL) {
errno = ENOMEM;
Expand Down

0 comments on commit 827bdf7

Please sign in to comment.