summaryrefslogtreecommitdiffstats
path: root/src/fuse/cowfile.c
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-03 11:42:11 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commit567f7fe50656fc1a2ddd40cbb7d28244ed8b10af (patch)
tree27d924eebadc02bb656de37f4d02f405d43c652b /src/fuse/cowfile.c
parent[FUSE] Cleanup (diff)
downloaddnbd3-567f7fe50656fc1a2ddd40cbb7d28244ed8b10af.tar.gz
dnbd3-567f7fe50656fc1a2ddd40cbb7d28244ed8b10af.tar.xz
dnbd3-567f7fe50656fc1a2ddd40cbb7d28244ed8b10af.zip
[FUSE] Fix printf length
Diffstat (limited to 'src/fuse/cowfile.c')
-rw-r--r--src/fuse/cowfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fuse/cowfile.c b/src/fuse/cowfile.c
index 82c7af7..dfa414e 100644
--- a/src/fuse/cowfile.c
+++ b/src/fuse/cowfile.c
@@ -1023,7 +1023,7 @@ bool cowfile_init( char *path, const char *image_Name, uint16_t imageVersion,
}
if ( cowUuid != NULL ) {
- snprintf( metadata->uuid, UUID_STRLEN, "%s", cowUuid );
+ snprintf( metadata->uuid, sizeof(metadata->uuid), "%s", cowUuid );
logadd( LOG_INFO, "Using provided upload session id" );
} else if ( !createSession( image_Name, imageVersion ) ) {
return false;
@@ -1142,7 +1142,7 @@ bool cowfile_load( char *path, atomic_uint_fast64_t **imageSizePtr, char *server
if ( cowUuid != NULL ) {
logadd( LOG_INFO, "Overriding stored upload session id with provided one" );
- snprintf( metadata->uuid, UUID_STRLEN, "%s", cowUuid );
+ snprintf( metadata->uuid, sizeof(metadata->uuid), "%s", cowUuid );
}
*imageSizePtr = &metadata->imageSize;