diff options
author | Sami Kerola | 2019-05-18 23:09:25 +0200 |
---|---|---|
committer | Sami Kerola | 2019-05-18 23:09:25 +0200 |
commit | 4f807791eee8ead3f38f1dce76f748fa0773f9a6 (patch) | |
tree | 33997c9c59083f84e419d75eaa70ffc2dd0a261b /lib | |
parent | sfdisk: remove unnecessary size check [cppcheck] (diff) | |
download | kernel-qcow2-util-linux-4f807791eee8ead3f38f1dce76f748fa0773f9a6.tar.gz kernel-qcow2-util-linux-4f807791eee8ead3f38f1dce76f748fa0773f9a6.tar.xz kernel-qcow2-util-linux-4f807791eee8ead3f38f1dce76f748fa0773f9a6.zip |
lib/mangle: fix possible null pointer dereference [cppcheck]
Fix effects code that is used when testing util-linux, so quite low impact.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mangle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mangle.c b/lib/mangle.c index b514cd8d3..87802fbda 100644 --- a/lib/mangle.c +++ b/lib/mangle.c @@ -155,9 +155,9 @@ int main(int argc, char *argv[]) } x = strdup(argv[2]); - unmangle_to_buffer(x, x, strlen(x) + 1); - if (x) { + unmangle_to_buffer(x, x, strlen(x) + 1); + printf("self-unmangled: '%s'\n", x); free(x); } |