Reviewed-by Joao Marcos Costa <jmcosta...@gmail.com> Em ter., 3 de nov. de 2020 às 08:12, Richard Genoud < richard.gen...@posteo.net> escreveu:
> memory allocation should always be checked > > Signed-off-by: Richard Genoud <richard.gen...@posteo.net> > --- > fs/squashfs/sqfs.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c > index 72181f38332..7da2e09cc36 100644 > --- a/fs/squashfs/sqfs.c > +++ b/fs/squashfs/sqfs.c > @@ -242,6 +242,9 @@ static char *sqfs_concat_tokens(char **token_list, int > token_count) > length = sqfs_get_tokens_length(token_list, token_count); > > result = malloc(length + 1); > + if (!result) > + return NULL; > + > result[length] = '\0'; > > for (i = 0; i < token_count; i++) { > -- Atenciosamente, João Marcos Costa www.linkedin.com/in/jmarcoscosta/ https://github.com/jmarcoscosta