all: Replace strlen() call on const string with sizeof()-1
This commit is contained in:
1 parent
8d52950ede
commit
f0712d5b23
3 files changed
+12
-12
No files matched your search
+1
-1
@@ -495,7 +495,7 @@ int fiasco_unpack(struct fiasco * fiasco, const char * dir) {
|
||||
|
||||
if ( image->layout ) {
|
||||
|
||||
layout_name = calloc(1, strlen(name) + strlen(".layout") + 1);
|
||||
layout_name = calloc(1, strlen(name) + sizeof(".layout")-1 + 1);
|
||||
if ( ! layout_name ) {
|
||||
free(name);
|
||||
ALLOC_ERROR_RETURN(-1);
|
||||
|
||||
Reference in new issue
Block a user