[Git][lvmteam/lvm2][main] man-generator: ensure p is defined

Zdeněk Kabeláč (@zdenek.kabelac) <[email protected]>
Newsgroups gmane.linux.lvm.devel
Message-ID <64b05743804c0_2923dbbc873485@gitlab-sidekiq-low-urgency-cpu-bound-v2-db56db498-s24dj.mail>

Zdeněk Kabeláč pushed to branch main at LVM team / lvm2


Commits:
93484c2a by Zdenek Kabelac at 2023-07-13T21:56:47+02:00
man-generator: ensure p is defined

In error path, p pointer could have been undefined.

- - - - -


1 changed file:

- tools/command.c


Changes:

=====================================
tools/command.c
=====================================
@@ -376,7 +376,7 @@ static int _val_str_to_num(char *str)
 static int _opt_str_to_num(struct command *cmd, char *str)
 {
 	char long_name[MAX_LONG_OPT_NAME_LEN];
-	char *p;
+	char *p = NULL;
 	int i;
 	int first = 0, last = ARG_COUNT - 1, middle;
 



View it on GitLab: https://gitlab.com/lvmteam/lvm2/-/commit/93484c2a62afb59f1503d04c953d76255b9e05b3

-- 
View it on GitLab: https://gitlab.com/lvmteam/lvm2/-/commit/93484c2a62afb59f1503d04c953d76255b9e05b3
You're receiving this email because of your account on gitlab.com.

--
lvm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/lvm-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.