Skip to content

Commit

Permalink
tools/lxc-ls: shutup lgtm
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed May 14, 2020
1 parent 1cbdec6 commit ab398a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lxc/tools/lxc_ls.c
Expand Up @@ -1166,6 +1166,9 @@ static int ls_recv_str(int fd, char **buf)
if (ret != sizeof(slen))
return -1;

if (slen == SIZE_MAX)
return -1;

if (slen > 0) {
*buf = malloc(sizeof(char) * (slen + 1));
if (!*buf)
Expand Down

0 comments on commit ab398a1

Please sign in to comment.