From f0712d5b23073fcb7d73085132ef72748fa31ae8 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sun, 19 Oct 2014 20:23:21 +0200 Subject: all: Replace strlen() call on const string with sizeof()-1 --- src/fiasco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fiasco.c') diff --git a/src/fiasco.c b/src/fiasco.c index 0c404bc..74d089f 100644 --- a/src/fiasco.c +++ b/src/fiasco.c @@ -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); -- cgit v1.2.3