graphviz/graphviz-2.42.2-coverity-scan-fixes.patch
Petr Šabata b99af1a037 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/graphviz#40a160ae422f59169e5207d62b29f0440e3d7c7f
2020-10-15 09:46:08 +02:00

27 lines
721 B
Diff

diff --git a/cmd/lefty/dot2l/dotlex.c b/cmd/lefty/dot2l/dotlex.c
index cf738c0..65e17e2 100644
--- a/cmd/lefty/dot2l/dotlex.c
+++ b/cmd/lefty/dot2l/dotlex.c
@@ -252,7 +252,7 @@ static char *scan_token (char *p) {
char *q;
q = lexbuf;
- if (p == '\0')
+ if (!p || *p == '\0')
return NULL;
while (isalnum (*p) || (*p == '_') || (!isascii (*p)))
*q++ = *p++;
diff --git a/cmd/tools/gvgen.c b/cmd/tools/gvgen.c
index c2b166d..c9a51e9 100644
--- a/cmd/tools/gvgen.c
+++ b/cmd/tools/gvgen.c
@@ -453,6 +453,8 @@ closeOpen (void)
fprintf(opts.outfile, "}\ngraph {\n");
}
+extern void makeTetrix(int depth, edgefn ef);
+
int main(int argc, char *argv[])
{
GraphType graphType;