mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate-utils: sqrt(-1.0) leads to undefined result
Using sqrt of -1 is not valid and leads to undefined results. When comparing the return value of the fucntion in validate-scenario, it is being checked with ret == -1, so it makes sense to just return -1 in error case. https://bugzilla.gnome.org/show_bug.cgi?id=748389
This commit is contained in:
parent
e832785604
commit
1e3084aa95
1 changed files with 2 additions and 3 deletions
|
@ -322,10 +322,9 @@ _parse (MathParser * parser)
|
||||||
"Failed to reach end of input expression, likely malformed input");
|
"Failed to reach end of input expression, likely malformed input");
|
||||||
} else
|
} else
|
||||||
return result;
|
return result;
|
||||||
} else {
|
|
||||||
return sqrt (-1.0);
|
|
||||||
}
|
}
|
||||||
return sqrt (-1.0);
|
|
||||||
|
return -1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gdouble
|
static gdouble
|
||||||
|
|
Loading…
Reference in a new issue